Skip to content

Commit

Permalink
feat: Beta 版 json-replace 应在目标 undefined 时才执行
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Oct 24, 2024
1 parent c8f2dc0 commit eb506c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/body-rewrite.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let result = {}
}
} else if (action === 'json-replace') {
for (let item of items) {
if ($.lodash_get(body, item[0]) != null) {
if ($.lodash_get(body, item[0]) !== undefined) {
$.lodash_set(body, item[0], item[1])
}
}
Expand Down

0 comments on commit eb506c4

Please sign in to comment.