From 69e7033fca28646d1f3f2c78db6e0e6c2796c3e8 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 1 Aug 2016 16:43:27 -0400 Subject: #292 - various items cleaned up, default to sqlite for devices, cleaned up entry paths to PortalLogin and ensured its AFTER DataModel.init() - wonder if this fixes #193 Former-commit-id: fbe5c0b0649b44912f5a52babeea5aa91a58e70f --- www/lib/localforage/src/utils/executeCallback.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 www/lib/localforage/src/utils/executeCallback.js (limited to 'www/lib/localforage/src/utils/executeCallback.js') diff --git a/www/lib/localforage/src/utils/executeCallback.js b/www/lib/localforage/src/utils/executeCallback.js new file mode 100644 index 00000000..c6982d4a --- /dev/null +++ b/www/lib/localforage/src/utils/executeCallback.js @@ -0,0 +1,11 @@ +function executeCallback(promise, callback) { + if (callback) { + promise.then(function(result) { + callback(null, result); + }, function(error) { + callback(error); + }); + } +} + +export default executeCallback; -- cgit v1.2.3