Skip to content

Commit

Permalink
Selector improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Dec 22, 2021
1 parent 8c25299 commit c747270
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 c747270

Please sign in to comment.