Skip to content

Commit 2c55644

Browse files
committed
Selector improvement
1 parent 221b2e8 commit 2c55644

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/store/state/selectors.ts

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ export function getEditorStateViews(state: State, stateKey: any | null): EditorV
2626
const stateId = opts.transformKeyToId(stateKey);
2727
if (!stateId) return [];
2828
const editor = state.editor.state.editors[stateId];
29+
if (!editor) return [];
2930
return editor.viewIds.map((id) => state.editor.state.views[id].view).filter((v) => v != null);
3031
}

0 commit comments

Comments
 (0)