Fix EditorModel clone to actually be useful

pull/21833/head
Michael Telatynski 2021-10-12 11:02:06 +01:00
parent fe70e64a40
commit ddc408690c
1 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,8 @@ export default class EditorModel {
}
public clone(): EditorModel {
return new EditorModel(this._parts, this._partCreator, this.updateCallback);
const clonedParts = this.parts.map(p => this.partCreator.deserializePart(p.serialize()));
return new EditorModel(clonedParts, this._partCreator, this.updateCallback);
}
private insertPart(index: number, part: Part): void {