mirror of https://gitee.com/antv-l7/antv-l7
fix: 事件取消订阅bug
This commit is contained in:
parent
acfa2dec33
commit
7a3105f156
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue