Skip to content

Commit

Permalink
fix(Rectangle): ignore error when map unmounted. (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 2, 2024
1 parent 3525687 commit e0af081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rectangle/src/useRectangle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const useRectangle = (props = {} as UseRectangle) => {
// 暂不使用这个 API,这个不兼容 v1.4.xx,改用 map.remove API
map && map.removeLayer(instance);
}
setRectangle(undefined);
}
setRectangle(undefined);
};
}
}, [map]);
Expand Down

0 comments on commit e0af081

Please sign in to comment.