mirror of
https://github.com/penpot/penpot.git
synced 2026-03-20 17:33:44 +00:00
The with-cache macro in impl.cljc assumed the target was always a PathData instance (which has a cache field). When content was a plain vector, (.-cache content) returned undefined in JS, causing: TypeError: Cannot read properties of undefined (reading 'get') Fix: - path/get-points (app.common.types.path) is now the canonical safe entry point: converts non-PathData content via impl/path-data and handles nil safely before delegating to segment/get-points - segment/get-points remains a low-level function that expects a PathData instance (no defensive logic at that level) - streams.cljs: replace direct call to path.segm/get-points with path/get-points so the safe conversion path is always used - with-cache macro: guards against nil/undefined cache, falling back to direct evaluation for non-PathData targets Signed-off-by: Andrey Antukh <niwi@niwi.nz>