refactor(editor): enable the noUncheckedIndexedAccess rule for the data-view package (#9351)

close: BS-2230
This commit is contained in:
zzj3720
2024-12-26 14:00:11 +00:00
parent 040f427e9e
commit 188cabc7d7
40 changed files with 258 additions and 123 deletions
@@ -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;
}