Skip to content

Commit

Permalink
Merge pull request #112 from cyndra0/fix
Browse files Browse the repository at this point in the history
fix: An operator precedence bug introduced in #110.
  • Loading branch information
dntzhang authored Apr 24, 2020
2 parents 4594576 + 7b33653 commit 922b375
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function _diff(current, pre, path, result) {
setResult(result, concatPathAndKey(path, key), currentValue)
} else {
for (let subKey in currentValue) {
const realPath = concatPathAndKey(path, key) + subKey.includes('.') ? `["${subKey}"]` : `.${subKey}`
const realPath = concatPathAndKey(path, key) + (subKey.includes('.') ? `["${subKey}"]` : `.${subKey}`)
_diff(currentValue[subKey], preValue[subKey], realPath, result)
}
}
Expand Down

0 comments on commit 922b375

Please sign in to comment.