summaryrefslogtreecommitdiff
path: root/app/node_modules/okdb/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/node_modules/okdb/index.js')
-rw-r--r--app/node_modules/okdb/index.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/node_modules/okdb/index.js b/app/node_modules/okdb/index.js
index cf670c1..6c01df0 100644
--- a/app/node_modules/okdb/index.js
+++ b/app/node_modules/okdb/index.js
@@ -37,9 +37,13 @@ function FSDB(options) {
this._db = low(filename);
}
-FSDB.prototype._resolve = function(data) {
+FSDB.prototype._resolve = function(data, success) {
+ success = typeof success === 'undefined' ? true : success;
return Q.Promise(function resolvePromise(resolve, reject) {
- resolve(data);
+ if (success)
+ resolve(data);
+ else
+ reject(data);
});
};