Skip to content

Commit

Permalink
v0.4.14
Browse files Browse the repository at this point in the history
  • Loading branch information
daengdaengLee committed Sep 23, 2020
2 parents 327e61e + a969b2b commit 1882381
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fxsvg",
"version": "0.4.13",
"version": "0.4.14",
"description": "Functional SVG Handling Library",
"type": "module",
"main": "./src/index.js",
Expand Down
12 changes: 2 additions & 10 deletions src/parsePathData/parsePathData.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const $$parseCoordinateSeqL = (str) =>
while (true) {
regexp_comma_wsp.lastIndex = index;
const comma_wsp_result = regexp_comma_wsp.exec(str);
if (comma_wsp_result) {
if (comma_wsp_result && equals2(index, comma_wsp_result.index)) {
index = comma_wsp_result.index + comma_wsp_result[0].length;
}

Expand Down Expand Up @@ -323,18 +323,10 @@ export const $$parsePathCommandParameters = ({ command, parameters }) => {
const processOptional = (regexp) => {
regexp.lastIndex = index;
const result = regexp.exec(str);
if (!result) {
if (!result || not(equals2(result.index, index))) {
return result;
}

if (not(equals2(result.index, index))) {
throw new InvalidArgumentsError(
FN_PATH_PARSE_PATH_COMMAND_PARAMETERS,
`"parameters"`,
JSON.stringify({ command, parameters })
);
}

index = result.index + result[0].length;
return result;
};
Expand Down

0 comments on commit 1882381

Please sign in to comment.