We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdcfc2c commit 94171faCopy full SHA for 94171fa
packages/polygon/src/usePolygon.tsx
@@ -33,7 +33,11 @@ export const usePolygon = (props = {} as UsePolygon) => {
33
34
useEffect(() => {
35
if (polygon) {
36
- polygon.setOptions(other);
+ const { path, ...rest } = other;
37
+ if (path) {
38
+ polygon.setPath(path);
39
+ }
40
+ polygon.setOptions(rest);
41
}
42
}, [polygon, other]);
43
packages/polyline/src/usePolyline.tsx
@@ -33,7 +33,11 @@ export function usePolyline(props = {} as UsePolyline) {
if (polyline) {
- polyline.setOptions(other);
+ polyline.setPath(path);
+ polyline.setOptions(rest);
}, [polyline, other]);
0 commit comments