From 186623bfa4fc9c5a6766633767a318fbc01ac173 Mon Sep 17 00:00:00 2001 From: Andrew Calcutt Date: Tue, 26 Sep 2023 23:38:27 -0400 Subject: [PATCH] fix: stroke color not working unless path is specified i found this issue testing encoded paths. If width is not specifed, stroke color does not work Signed-off-by: Andrew Calcutt --- src/serve_rendered.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serve_rendered.js b/src/serve_rendered.js index beacf67..fc9982f 100644 --- a/src/serve_rendered.js +++ b/src/serve_rendered.js @@ -511,8 +511,8 @@ const drawPath = (ctx, path, query, pathQuery, z) => { if ('stroke' in query) { ctx.strokeStyle = query.stroke; } - // Path Width gets higher priority - if (pathHasWidth) { + // Path Stroke gets higher priority + if (pathHasStroke) { ctx.strokeStyle = splitPaths .find((x) => x.startsWith('stroke:')) .replace('stroke:', '');