Skip to content

Commit

Permalink
chore: remove debug code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 20, 2022
1 parent 5adef63 commit 7dbd735
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/useCopied.tsx
Expand Up @@ -14,9 +14,8 @@ export function useCopied(container: React.RefObject<HTMLDivElement>) {
useEffect(() => {
const btns = container.current?.querySelectorAll('pre code + div.copied');
btns && Array.from(btns).forEach((elm) => elm.addEventListener('click', handle, false));
btns && Array.from(btns).forEach((elm) => elm.addEventListener('click', (evn) => {}, false));
return () => {
btns && Array.from(btns).forEach((elm) => elm.removeEventListener('click', handle));
btns && Array.from(btns).forEach((elm) => elm.removeEventListener('click', handle, false));
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [container]);
Expand Down

0 comments on commit 7dbd735

Please sign in to comment.