From 7e54917d9415649cf6f672016262370b3cf4dfa2 Mon Sep 17 00:00:00 2001 From: laoluo Date: Tue, 20 Dec 2022 17:21:48 +0800 Subject: [PATCH] perf: Improve code compatibility --- .../src/views/MainView/sidebar/SwitchAttributeList/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx b/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx index 1399ba7f3..2dd6047ef 100644 --- a/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx +++ b/packages/lb-components/src/views/MainView/sidebar/SwitchAttributeList/index.tsx @@ -34,7 +34,7 @@ const SwitchAttributeList: React.FC = (props) => { }); } return () => { - toolInstance.unbindAll('changeAttributeSidebar'); + toolInstance?.unbindAll('changeAttributeSidebar'); }; }, [toolInstance, listRef]);