From d051a3ba4572c9aea3c43b8d2062ce4b4c50d679 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 24 Mar 2026 00:18:44 +0000 Subject: [PATCH] :bug: Ensure path content is always PathData when saving The save-path-content function only converted content to PathData when there was a trailing :move-to command. When there was no trailing :move-to, the content from get-path was stored as-is, which could be a plain vector if the shape was already a :path type with non-PathData content. This caused segment/get-points to fail with 'can't access property "get", cache is undefined' when the with-cache macro tried to access the cache field on a non-PathData object. The fix ensures content is always converted to PathData via path/content before being stored in the state. Signed-off-by: Andrey Antukh --- frontend/src/app/main/data/workspace/path/changes.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/path/changes.cljs b/frontend/src/app/main/data/workspace/path/changes.cljs index c2bc293da3..8eb73b3663 100644 --- a/frontend/src/app/main/data/workspace/path/changes.cljs +++ b/frontend/src/app/main/data/workspace/path/changes.cljs @@ -69,7 +69,7 @@ content (if (and (not preserve-move-to) (= (-> content last :command) :move-to)) (path/content (take (dec (count content)) content)) - content)] + (path/content content))] (st/set-content state content))) ptk/WatchEvent