Skip to content

Commit 40a3710

Browse files
rounittxxrounittxx
authored andcommitted
Fix: add missing dependencies to useCallback
1 parent 92f2319 commit 40a3710

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/EditorHeader/ControlPanel.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,14 @@ export default function ControlPanel({
641641
default:
642642
break;
643643
}
644-
});
644+
}, [
645+
layout.readOnly,
646+
selectedElement.element,
647+
selectedElement.id,
648+
deleteTable,
649+
deleteNote,
650+
deleteArea,
651+
]);
645652
const duplicate = () => {
646653
if (layout.readonly) {
647654
return;

0 commit comments

Comments
 (0)