Skip to content

Commit 26d10d9

Browse files
refactor: revert back to *old* way of cloning
1 parent 1441a01 commit 26d10d9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/core/src/exposed-thing.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ export default class ExposedThing extends TD.Thing implements WoT.ExposedThing {
122122
this.actions = {};
123123
this.events = {};
124124

125-
const deepClonedModel = structuredClone(thingModel);
125+
// Deep clone the Thing Model
126+
// without functions or methods
127+
const deepClonedModel = JSON.parse(JSON.stringify(thingModel));
126128
Object.assign(this, deepClonedModel);
127129

128130
// unset "@type":"tm:ThingModel" ?

0 commit comments

Comments
 (0)