[ospec] Fix for objects with undefined properties
This commit is contained in:
parent
027a220779
commit
df1e19b86c
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ module.exports = new function init() {
|
|||
var aIsArgs = isArguments(a), bIsArgs = isArguments(b)
|
||||
if (a.constructor === Object && b.constructor === Object && !aIsArgs && !bIsArgs) {
|
||||
for (var i in a) {
|
||||
if (!deepEqual(a[i], b[i])) return false
|
||||
if ((!(i in b)) || !deepEqual(a[i], b[i])) return false
|
||||
}
|
||||
for (var i in b) {
|
||||
if (!(i in a)) return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue