mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-28 15:55:19 +08:00
fix(editor): view recorded in storage may not exist (#9788)
fix: BS-2415
This commit is contained in:
@@ -333,7 +333,12 @@ export class DatabaseBlockComponent extends CaptionedBlockComponent<DatabaseBloc
|
||||
this._dataSource = new DatabaseBlockDataSource(this.model);
|
||||
this._dataSource.contextSet(HostContextKey, this.host);
|
||||
const id = currentViewStorage.getCurrentView(this.model.id);
|
||||
if (id) {
|
||||
if (id && this.dataSource.viewManager.viewGet(id)) {
|
||||
console.log(
|
||||
'set current view',
|
||||
id,
|
||||
this._dataSource.viewManager.viewGet(id)
|
||||
);
|
||||
this.dataSource.viewManager.setCurrentView(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user