fix: 事件取消订阅bug

This commit is contained in:
聆一 2020-02-21 14:49:20 +08:00
parent acfa2dec33
commit 7a3105f156
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ export const SceneEvent = React.memo((props: ILayerProps) => {
useEffect(() => {
mapScene.on(type, handler);
return () => {
mapScene.off('type', handler);
mapScene.off(type, handler);
};
}, [type]);
return null;