diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -252,8 +252,10 @@ function forSome(each) { if (obj == null) return false if (typeof obj === 'string') return each(obj) if (Array.isArray(obj)) return obj.some(some) - if (typeof obj === 'object') - for (var k in obj) if (some(obj[k])) return true + if (typeof obj === 'object') for (var k in obj) { + if (each(k)) return true + if (some(obj[k])) return true + } return false } } |