Skip to content

Commit

Permalink
Selector improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Dec 21, 2021
1 parent 1962ab1 commit 2396f4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/store/state/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ export function getEditorStateViews(state: State, stateKey: any | null): EditorV
const stateId = opts.transformKeyToId(stateKey);
if (!stateId) return [];
const editor = state.editor.state.editors[stateId];
if (!editor) return [];
return editor.viewIds.map((id) => state.editor.state.views[id].view).filter((v) => v != null);
}

0 comments on commit 2396f4f

Please sign in to comment.