diff --git a/common/src/app/common/path_names.cljc b/common/src/app/common/path_names.cljc index 6fab97e66e..74774c0044 100644 --- a/common/src/app/common/path_names.cljc +++ b/common/src/app/common/path_names.cljc @@ -99,11 +99,11 @@ Some naming conventions: (defn butlast-path "Remove the last item of the path." - [path separator] - (let [split (split-path path :separator separator)] + [path] + (let [split (split-path path)] (if (= 1 (count split)) "" - (join-path (butlast split) :separator separator)))) + (join-path (butlast split))))) (defn butlast-path-with-dots "Remove the last item of the path." diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs index 122e9fc186..a742e95afd 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs @@ -716,7 +716,7 @@ (remove str/empty?) (remove nil?) (distinct) - (filter #(= (cpn/butlast-path % "/") (:path filters)))) + (filter #(= (cpn/butlast-path %) (:path filters)))) groups (when-not search? (->> (sort (sequence xform components)) @@ -762,7 +762,7 @@ on-go-back (mf/use-fn (mf/deps (:path filters)) - #(swap! filters* assoc :path (cpn/butlast-path (:path filters) "/"))) + #(swap! filters* assoc :path (cpn/butlast-path (:path filters)))) on-enter-group (mf/use-fn #(swap! filters* assoc :path %))