diff --git a/lib/localStorage.js b/lib/localStorage.js index 4a74dff..980f8f4 100644 --- a/lib/localStorage.js +++ b/lib/localStorage.js @@ -15,7 +15,7 @@ db = LocalStorage; db.prototype.getItem = function (key) { - if (key in this) { + if (this.hasOwnProperty(key)) { return String(this[key]); } return null;