mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 00:23:54 +00:00
Replace structuredClone with JSON.parse (#6237)
This commit is contained in:
parent
2246f33023
commit
66d7c626e1
@ -75,7 +75,7 @@ class MutableDomainObject {
|
|||||||
return eventOff;
|
return eventOff;
|
||||||
}
|
}
|
||||||
$set(path, value) {
|
$set(path, value) {
|
||||||
const oldModel = structuredClone(this);
|
const oldModel = JSON.parse(JSON.stringify(this));
|
||||||
const oldValue = _.get(oldModel, path);
|
const oldValue = _.get(oldModel, path);
|
||||||
MutableDomainObject.mutateObject(this, path, value);
|
MutableDomainObject.mutateObject(this, path, value);
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ class MutableDomainObject {
|
|||||||
Object.assign(mutable, object);
|
Object.assign(mutable, object);
|
||||||
|
|
||||||
mutable.$observe('$_synchronize_model', (updatedObject) => {
|
mutable.$observe('$_synchronize_model', (updatedObject) => {
|
||||||
let clone = structuredClone(updatedObject);
|
let clone = JSON.parse(JSON.stringify(updatedObject));
|
||||||
utils.refresh(mutable, clone);
|
utils.refresh(mutable, clone);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user