Permalink
Browse files

Fixed issue with internal method property_exists when testing String …

…items
  • Loading branch information...
1 parent 31a7172 commit 3694174b9edace7aec8f771bb49a780eecce26ee @constantology committed Nov 1, 2012
Showing with 11 additions and 5 deletions.
  1. +5 −2 m8.js
  2. +1 −1 m8.min.js
  3. +5 −2 src/lib.js
View
7 m8.js
@@ -231,7 +231,10 @@
return false;
}
- if ( !!~property.indexOf( '.' ) ) {
+ if ( test( item, property ) )
+ return true;
+
+ if ( typeof item != 'string' && !!~property.indexOf( '.' ) ) {
property = property.split( '.' );
while ( key = property.shift() ) {
@@ -244,7 +247,7 @@
return true;
}
- return test( item, property );
+ return false;
}
function range( i, j ) {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -177,7 +177,10 @@
return false;
}
- if ( !!~property.indexOf( '.' ) ) {
+ if ( test( item, property ) )
+ return true;
+
+ if ( typeof item != 'string' && !!~property.indexOf( '.' ) ) {
property = property.split( '.' );
while ( key = property.shift() ) {
@@ -190,7 +193,7 @@
return true;
}
- return test( item, property );
+ return false;
}
function range( i, j ) {

0 comments on commit 3694174

Please sign in to comment.