datastake-daf 0.6.400 → 0.6.401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18802,16 +18802,10 @@ const useMap$1 = ({
18802
18802
  setData(null);
18803
18803
  }
18804
18804
  }
18805
- if (mapRef && polylinesRef.current.length && type === "chain") {
18805
+ if (polylinesRef.current.length && type === "chain") {
18806
18806
  polylinesRef.current.forEach(polyline => {
18807
- if (mapRef.hasLayer(polyline)) {
18808
- mapRef.removeLayer(polyline);
18809
- }
18810
- if (polyline.remove) {
18811
- polyline.remove();
18812
- }
18807
+ mapRef.removeLayer(polyline);
18813
18808
  });
18814
- polylinesRef.current = [];
18815
18809
  }
18816
18810
  }, [allData, type]);
18817
18811
  React.useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.400",
3
+ "version": "0.6.401",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -269,16 +269,10 @@ export const useMap = ({
269
269
  }
270
270
  }
271
271
 
272
- if (mapRef && polylinesRef.current.length && type === "chain") {
272
+ if (polylinesRef.current.length && type === "chain") {
273
273
  polylinesRef.current.forEach((polyline) => {
274
- if (mapRef.hasLayer(polyline)) {
275
- mapRef.removeLayer(polyline);
276
- }
277
- if (polyline.remove) {
278
- polyline.remove();
279
- }
274
+ mapRef.removeLayer(polyline);
280
275
  });
281
- polylinesRef.current = [];
282
276
  }
283
277
  }, [allData, type]);
284
278