diff --git a/frontend/src/app/main/data/workspace/path/drawing.cljs b/frontend/src/app/main/data/workspace/path/drawing.cljs index ce2f2ab240..eab307ff44 100644 --- a/frontend/src/app/main/data/workspace/path/drawing.cljs +++ b/frontend/src/app/main/data/workspace/path/drawing.cljs @@ -304,11 +304,8 @@ (ptk/reify ::handle-drawing-end ptk/UpdateEvent (update [_ state] - (let [content (dm/get-in state [:workspace-drawing :object :content])] - - (assert (path/check-path-content content) - "expected valid path content instance") - + (let [content (some-> (dm/get-in state [:workspace-drawing :object :content]) + (path/check-path-content))] (if (> (count content) 1) (assoc-in state [:workspace-drawing :object :initialized?] true) state))) diff --git a/frontend/src/app/main/data/workspace/path/tools.cljs b/frontend/src/app/main/data/workspace/path/tools.cljs index 7b1977ff89..0fd108f41c 100644 --- a/frontend/src/app/main/data/workspace/path/tools.cljs +++ b/frontend/src/app/main/data/workspace/path/tools.cljs @@ -7,7 +7,6 @@ (ns app.main.data.workspace.path.tools (:require [app.common.data.macros :as dm] - [app.common.files.helpers :as cfh] [app.common.types.path :as path] [app.common.types.path.segment :as path.segment] [app.main.data.changes :as dch] @@ -48,12 +47,10 @@ (changes/generate-path-changes it objects page-id shape (:content shape) new-content)] (rx/concat - (if (cfh/path-shape? shape) - (rx/empty) - (rx/of (dwsh/update-shapes [id] path/convert-to-path))) - (rx/of (dch/commit-changes changes) - (when (empty? new-content) - (dwe/clear-edition-mode))))))))))) + (rx/of (dwsh/update-shapes [id] path/convert-to-path) + (dch/commit-changes changes)) + (when (empty? new-content) + (rx/of (dwe/clear-edition-mode))))))))))) (defn make-corner ([]