fix: 修复初始页面就有两条历史记录

This commit is contained in:
lihao.ylh 2022-02-23 15:22:58 +08:00
parent 251b5c496e
commit c21aeb9a5c
2 changed files with 14 additions and 15 deletions

View File

@ -86,7 +86,7 @@ export class DocumentModel {
} }
get fileName(): string { get fileName(): string {
return this.rootNode?.getExtraProp('fileName')?.getAsString() || this.id; return this.rootNode?.getExtraProp('fileName', false)?.getAsString() || this.id;
} }
set fileName(fileName: string) { set fileName(fileName: string) {

View File

@ -57,7 +57,6 @@ export class History {
this.emitter.emit('statechange', currentState); this.emitter.emit('statechange', currentState);
} }
} }
// }
}); });
}, { fireImmediately: true }); }, { fireImmediately: true });
} }