Skip to content

AI-native design editor. Open-source Figma alternative.

Fix open paths rendering as closed

Danila Poyarkovf741eaa29641
diff --git a/src/engine/vector.ts b/src/engine/vector.ts
index f2c146e41..c75cd79e8 100644
--- a/src/engine/vector.ts
+++ b/src/engine/vector.ts
@@ -188,7 +188,11 @@ function addLoopToPath(
for (const segIdx of loop) {
addSegmentToPath(path, segments[segIdx], vertices)
}
- path.close()
+
+ const lastSeg = segments[loop[loop.length - 1]]
+ if (lastSeg.end === firstSeg.start) {
+ path.close()
+ }
}
function addSegmentToPath(