diff --git a/common/src/app/common/files/helpers.cljc b/common/src/app/common/files/helpers.cljc index 701575583..01507eea0 100644 --- a/common/src/app/common/files/helpers.cljc +++ b/common/src/app/common/files/helpers.cljc @@ -32,13 +32,17 @@ ([objects id] (is-direct-child-of-root? (get objects id))) ([shape] - (and (some? shape) (= (dm/get-prop shape :frame-id) uuid/zero)))) + (and (some? shape) + (= (dm/get-prop shape :frame-id) uuid/zero)))) (defn root-frame? ([objects id] - (root-frame? (get objects id))) + (if (= id uuid/zero) + false + (root-frame? (get objects id)))) ([shape] (and (some? shape) + (not= (dm/get-prop shape :id) uuid/zero) (= (dm/get-prop shape :type) :frame) (= (dm/get-prop shape :frame-id) uuid/zero))))