Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

isEmptyObject should use hasOwnProperty: prevents from always returni…

…ng true if the Object.prototype is extended


#176

Signed-off-by: Alexander Johansson <alexander@n1s.se>
  • Loading branch information...
commit 26f2682620e1032f7b39a9f24a4bdc991b23f9bd 1 parent de8554b
@KATT authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 scripts/uncompressed/history.js
View
4 scripts/uncompressed/history.js
@@ -323,7 +323,9 @@
*/
History.isEmptyObject = function(obj) {
for ( var name in obj ) {
- return false;
+ if ( obj.hasOwnProperty(name) ) {
+ return false;
+ }
}
return true;
};

0 comments on commit 26f2682

Please sign in to comment.
Something went wrong with that request. Please try again.