Skip to content

Commit

Permalink
Check for null in DuplicateAction (#6904)
Browse files Browse the repository at this point in the history
check for null before checking before hasOwnProperty
  • Loading branch information
scottbell authored Aug 9, 2023
1 parent 58aeac9 commit 9be9c5e
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 9be9c5e

Please sign in to comment.