Skip to content

Commit 8dd7a3b

Browse files
authoredNov 29, 2023
fix(convertPathData): handle setting prev properly to fix path joining and #1855 (#1856)
1 parent 86d5040 commit 8dd7a3b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed
 

‎plugins/convertPathData.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -828,15 +828,12 @@ function filters(
828828

829829
item.command = command;
830830
item.args = data;
831-
832-
prev = item;
833831
} else {
834832
// z resets coordinates
835833
relSubpoint[0] = pathBase[0];
836834
relSubpoint[1] = pathBase[1];
837835
// @ts-ignore
838836
if (prev.command === 'Z' || prev.command === 'z') return false;
839-
prev = item;
840837
}
841838
if (
842839
(command === 'Z' || command === 'z') &&
@@ -849,6 +846,7 @@ function filters(
849846
)
850847
return false;
851848

849+
prev = item;
852850
return true;
853851
});
854852

‎test/plugins/convertPathData.29.svg

+15
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.