x in obj -> obj.hasOwnProperty(x)

This commit is contained in:
AJ ONeal 2013-01-25 21:11:48 -07:00
parent 8030a1a41e
commit c8bdb31e84
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@
db = LocalStorage; db = LocalStorage;
db.prototype.getItem = function (key) { db.prototype.getItem = function (key) {
if (key in this) { if (this.hasOwnProperty(key)) {
return String(this[key]); return String(this[key]);
} }
return null; return null;