Skip to content

Commit

Permalink
fix(Marker): fix marker.removeis not a function (#244).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 1, 2022
1 parent 9b289b6 commit e86d50c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/marker/src/useMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const useMarker = (props: UseMarker = {}) => {
}
return () => {
if (marker) {
marker.remove();
// @fix [244] https://github.com/uiwjs/react-amap/issues/244
typeof marker.remove === 'function' && marker.remove();
setMarker(undefined);
}
};
Expand Down

1 comment on commit e86d50c

@vercel
Copy link

@vercel vercel bot commented on e86d50c Aug 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-amap – ./

react-amap-one.vercel.app
react-amap-398188662.vercel.app
react-amap-git-master-398188662.vercel.app

Please sign in to comment.