Skip to content

Commit

Permalink
fix .getItem() for using with callback
Browse files Browse the repository at this point in the history
  • Loading branch information
yurks authored Feb 20, 2017
1 parent 255b61c commit cd2fa93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/local-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cd2fa93

Please sign in to comment.