Check for null in DuplicateAction (#6904)

check for null before checking before hasOwnProperty
This commit is contained in:
Scott Bell 2023-08-09 20:38:17 +02:00 committed by GitHub
parent 58aeac94ac
commit 9be9c5e28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 &&