mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
Check for null in DuplicateAction (#6904)
check for null before checking before hasOwnProperty
This commit is contained in:
parent
58aeac94ac
commit
9be9c5e28e
@ -221,6 +221,8 @@ export default class DuplicateTask {
|
|||||||
// parse reviver to replace identifiers
|
// parse reviver to replace identifiers
|
||||||
clonedParent = JSON.parse(clonedParent, (key, value) => {
|
clonedParent = JSON.parse(clonedParent, (key, value) => {
|
||||||
if (
|
if (
|
||||||
|
value !== null &&
|
||||||
|
value !== undefined &&
|
||||||
Object.prototype.hasOwnProperty.call(value, 'key') &&
|
Object.prototype.hasOwnProperty.call(value, 'key') &&
|
||||||
Object.prototype.hasOwnProperty.call(value, 'namespace') &&
|
Object.prototype.hasOwnProperty.call(value, 'namespace') &&
|
||||||
value.key === oldId.key &&
|
value.key === oldId.key &&
|
||||||
|
Loading…
Reference in New Issue
Block a user