diff --git a/lib/index.js b/lib/index.js index 275a97d..3b72e52 100644 --- a/lib/index.js +++ b/lib/index.js @@ -36,7 +36,7 @@ } Storage.prototype.getItem = function (key) { - if (key in this) { + if (this.hasOwnProperty(key)) { return String(this[key]); } return null;