From c8bdb31e84550cfa2acffd6fbf46a1ba8a5b51eb Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 25 Jan 2013 21:11:48 -0700 Subject: [PATCH] x in obj -> obj.hasOwnProperty(x) --- lib/localStorage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;