Skip to content

Commit

Permalink
fix: source组件卸载BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
leiyuanxiang committed Sep 1, 2022
1 parent a510ee8 commit 879207f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/source/source.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const Source: FC<SourceProps> = forwardRef<GeoJSONSource, SourceProps>((p
setterMap,
converterMap,
unmount: () => {
map && map.removeSource(id);
//@ts-ignore
map && map.style && map.removeSource(id);
},
});

Expand Down

0 comments on commit 879207f

Please sign in to comment.