Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
12joan committed Jan 6, 2024
1 parent 4fcce67 commit 964df2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/components/PlateControllerEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const PlateControllerEffect = ({
const store = usePlateStore(id).store();

const primary = usePlateSelectors(id).primary();
const setPrimaryEdtorIds = usePlateControllerActions().primaryEditorIds({
const setPrimaryEditorIds = usePlateControllerActions().primaryEditorIds({
warnIfNoStore: false,
});

Expand All @@ -53,13 +53,13 @@ export const PlateControllerEffect = ({

React.useEffect(() => {
if (primary) {
setPrimaryEdtorIds((ids) => [...ids, id]);
setPrimaryEditorIds((ids) => [...ids, id]);

return () => {
setPrimaryEdtorIds((ids) => ids.filter((i) => i !== id));
setPrimaryEditorIds((ids) => ids.filter((i) => i !== id));
};
}
}, [id, primary, setPrimaryEdtorIds]);
}, [id, primary, setPrimaryEditorIds]);

React.useEffect(() => {
if (id && focused) {
Expand Down

0 comments on commit 964df2d

Please sign in to comment.