Skip to content

Commit

Permalink
fix: remove transaction from useEditorSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
lFandoriNl committed Dec 2, 2023
1 parent dcff1d1 commit 6f776c6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/react-editor/src/use-editor-selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ export const useEditorSelector = <T>(

const editor = useEditor();

const selectorResultRef = useRef<T>(
selector({ editor, transaction: editor.state.tr }),
);
const selectorResultRef = useRef<T>(selector({ editor }));

useEffect(() => {
const update = (dataUpdated: EditorEvents['update']) => {
Expand Down

0 comments on commit 6f776c6

Please sign in to comment.