Skip to content

Commit

Permalink
cherry-pick(#6904): Check for null in DuplicateAction
Browse files Browse the repository at this point in the history
check for null before checking before hasOwnProperty
  • Loading branch information
scottbell authored and ozyx committed Aug 9, 2023
1 parent 32b68cf commit c04f7b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/duplicate/DuplicateTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ export default class DuplicateTask {
// parse reviver to replace identifiers
clonedParent = JSON.parse(clonedParent, (key, value) => {
if (
value !== null &&
value !== undefined &&
Object.prototype.hasOwnProperty.call(value, 'key') &&
Object.prototype.hasOwnProperty.call(value, 'namespace') &&
value.key === oldId.key &&
Expand Down

0 comments on commit c04f7b0

Please sign in to comment.