Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bad assumption, objects might inherit other than Object.prototype

  • Loading branch information...
commit baedc500c2475ad4a94535be44be327493471957 1 parent fc0023e
Paulo Lopes authored
Showing with 4 additions and 2 deletions.
  1. +3 −1 .gitignore
  2. +1 −1  lib/attribute.js
View
4 .gitignore
@@ -12,4 +12,6 @@ logs
results
node_modules
-npm-debug.log
+npm-debug.log
+
+.idea
View
2  lib/attribute.js
@@ -18,7 +18,7 @@ function testType(instance, options, propertyName, type){
case 'integer': return (typeof instance=='number') && instance%1===0;
case 'boolean': return (typeof instance=='boolean');
case 'object':
- return (instance && (typeof instance)=='object' && Object.getPrototypeOf(instance)===Object.prototype);
+ return (instance && (typeof instance)=='object');
case 'array': return (instance instanceof Array);
case 'null': return (instance===null);
case 'date': return (instance instanceof Date);
Please sign in to comment.
Something went wrong with that request. Please try again.