undefine is not defined
aa403210842 opened this issue · comments
i found a spelling mistake
line 86 ~95
function getPath(obj, path) {
let parts = path.split('.')
while (parts.length) {
obj = obj[parts.shift()]
if (typeof obj !== 'object' && parts.length) {
return undefine // here
}
}
return obj
}
@aa403210842 strange, that part was covered by the tests. What environment are you running on?
@aa403210842 No I was mistaken. That case is not covered by the test. Can you give me an example of what caused it and I'll add a test case for it? (if not I'll figure it out).
https://coveralls.io/builds/9325729/source?filename=lib%2Fmongoose-hidden.js#L91
UPDATE no need to provide data, I'm extending tests. Note that 0.9.1 has already been published with this fix.
@aa403210842 tests covers that case now https://coveralls.io/builds/9329461/source?filename=lib%2Fmongoose-hidden.js#L91