From cd2fa93ac6e6a2132ecc0f63f182ad16004b86ca Mon Sep 17 00:00:00 2001 From: yurks Date: Mon, 20 Feb 2017 19:25:08 +0200 Subject: [PATCH] fix .getItem() for using with callback --- src/local-storage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/local-storage.js b/src/local-storage.js index 169656e..f20de02 100644 --- a/src/local-storage.js +++ b/src/local-storage.js @@ -274,8 +274,9 @@ LocalStorage.prototype = { return deferred.resolve(null); } return this.removeItem(key).then(function() { + callback(null, null); return null; - }); + }, callback); } else { callback(null, this.data[key] && this.data[key].value); deferred.resolve(this.data[key] && this.data[key].value);