Permalink
Browse files

x in obj -> obj.hasOwnProperty(x)

  • Loading branch information...
1 parent 8030a1a commit c8bdb31e84550cfa2acffd6fbf46a1ba8a5b51eb @coolaj86 committed Jan 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/localStorage.js
View
2 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;

0 comments on commit c8bdb31

Please sign in to comment.