mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 11:51:36 +02:00
Fix EditorModel clone to actually be useful
This commit is contained in:
parent
fe70e64a40
commit
ddc408690c
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user