mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 20:57:08 +08:00
refactor(editor): enable the noUncheckedIndexedAccess rule for the data-view package (#9351)
close: BS-2230
This commit is contained in:
@@ -148,7 +148,11 @@ export class DataViewHeaderViews extends WidgetBase {
|
||||
}
|
||||
const views = this.viewManager.views$.value;
|
||||
const index = views.findIndex(v => v === id);
|
||||
const view = this.viewManager.viewGet(views[index]);
|
||||
const viewId = views[index];
|
||||
if (!viewId) {
|
||||
return;
|
||||
}
|
||||
const view = this.viewManager.viewGet(viewId);
|
||||
if (!view) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user