Replace structuredClone with JSON.parse (#6237)

This commit is contained in:
Andrew Henry 2023-01-31 15:10:13 -08:00 committed by GitHub
parent 2246f33023
commit 66d7c626e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ class MutableDomainObject {
return eventOff;
}
$set(path, value) {
const oldModel = structuredClone(this);
const oldModel = JSON.parse(JSON.stringify(this));
const oldValue = _.get(oldModel, path);
MutableDomainObject.mutateObject(this, path, value);
@ -126,7 +126,7 @@ class MutableDomainObject {
Object.assign(mutable, object);
mutable.$observe('$_synchronize_model', (updatedObject) => {
let clone = structuredClone(updatedObject);
let clone = JSON.parse(JSON.stringify(updatedObject));
utils.refresh(mutable, clone);
});