From 7f17918ed93f0c51e4a65390e3e53464341d936e Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Mon, 15 Sep 2014 18:19:12 -0300 Subject: [PATCH] fix storage set --- js/models/Storage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/models/Storage.js b/js/models/Storage.js index 3433589bf..103cb9a8d 100644 --- a/js/models/Storage.js +++ b/js/models/Storage.js @@ -155,7 +155,9 @@ Storage.prototype.getMany = function(walletId, keys, cb) { // set value for key Storage.prototype.set = function(walletId, k, v, cb) { - preconditions.checkArgument(walletId && k && !_.isUndefined(v) && cb); + preconditions.checkArgument(walletId && k && cb); + + if (_.isUndefined(v)) return cb(); this._write(this._key(walletId, k), v, cb); };