Skip to content

Commit

Permalink
refactor: optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
libra-co committed Oct 8, 2023
1 parent d8f815a commit 5479d5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extension/plugins/link/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const LinkMenu = ({ isRichEditor, className, readonly, editor }) => {

useEffect(() => {
const eventBus = EventBus.getInstance();
const unsubscript = eventBus.subscribe(INTERNAL_EVENTS.ON_OPEN_LINK_POPOVER, handleOpenLinkModal);
return () => unsubscript();
const unsubscribe = eventBus.subscribe(INTERNAL_EVENTS.ON_OPEN_LINK_POPOVER, handleOpenLinkModal);
return () => unsubscribe();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

Expand Down

0 comments on commit 5479d5a

Please sign in to comment.