We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7cead2 commit 2b79055Copy full SHA for 2b79055
src/data/model/immutable/HashedObject.ts
@@ -246,17 +246,20 @@ abstract class HashedObject {
246
}
247
248
clone() : this {
249
- let c = this.toContext();
+ const c = this.toContext();
250
251
+ const current = c.objects;
252
+
253
c.objects = new Map<Hash, HashedObject>();
254
255
let clone = HashedObject.fromContext(c) as this;
256
- clone.init();
257
+ for (const [hash, obj] of current.entries()) {
258
+ const clonedObj = c.objects.get(hash) as HashedObject;
259
+ clonedObj._signOnSave = obj._signOnSave;
260
+ clonedObj._lastSignature = obj._lastSignature;
261
+ }
262
- clone._signOnSave = this._signOnSave;
- clone._lastSignature = this._lastSignature;
-
263
return clone;
264
265
0 commit comments