From 1d36249cc768fe0b9886b10cf1a4c112ae76dd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Fri, 15 Mar 2024 12:29:01 +0100 Subject: [PATCH] Fix lint --- src/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index d0067a4..6cb84c5 100644 --- a/src/index.js +++ b/src/index.js @@ -108,7 +108,7 @@ const advanceIndexByCommand = function (code) { case 0x54: // T return 3; } - throw new Error('Invalid command code ' + code); + throw new Error(`Invalid command code ${code}`); }; @@ -218,7 +218,7 @@ const svgPathParse = function (d) { const segments = [], buffer = Buffer.from(d, 'ascii'), pathLength = buffer.length; - let _currStartIndex, code, _previousCode, needParams, _previousNeedParams, + let _currStartIndex, code, needParams, _previousNeedParams, i = 0; while (i < pathLength) { @@ -237,7 +237,6 @@ const svgPathParse = function (d) { } _currStartIndex = i; i += advanceIndexByCommand(code); - _previousCode = code; _previousNeedParams = needParams; } i++;