Skip to content

Commit 30dc1bd

Browse files
committed
data.RecordFactory: record.toJSON() => return a cloned data object #6684
1 parent ef18bd0 commit 30dc1bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data/RecordFactory.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class RecordFactory extends Base {
233233
* @returns {Object}
234234
*/
235235
toJSON() {
236-
return this[dataSymbol]
236+
return structuredClone(this[dataSymbol])
237237
}
238238
};
239239

0 commit comments

Comments
 (0)