From 277ff128225123cf960420a97c01ba54975fe79f Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 10 Mar 2021 12:01:13 +0100 Subject: [PATCH] :bug: Fixes problem with empty prototype navigation --- CHANGES.md | 1 + .../ui/workspace/sidebar/options/menus/interactions.cljs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9dc3a59a3..6f016b14a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -29,6 +29,7 @@ - Fix problem with resolved comments [Taiga #1406](https://tree.taiga.io/project/penpot/issue/1406) - Fix problem with comments styles on dashboard [Taiga #1405](https://tree.taiga.io/project/penpot/issue/1405) - Fix problem with default square grid [Taiga #1344](https://tree.taiga.io/project/penpot/issue/1344) +- Fix error with the "Navigate to" button on prototypes [Taiga #1268](https://tree.taiga.io/project/penpot/issue/1268) ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs index 1b8033a8d..6e47ee95c 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs @@ -37,7 +37,8 @@ show-frames-dropdown? (mf/use-state false) on-set-blur #(reset! show-frames-dropdown? false) - on-navigate #(st/emit! (dw/select-shapes (d/ordered-set (:id destination)))) + on-navigate #(when destination + (st/emit! (dw/select-shapes (d/ordered-set (:id destination))))) on-select-destination (fn [dest] @@ -77,4 +78,5 @@ [:li {:key (:id frame) :on-click #(on-select-destination (:id frame))} (:name frame)]))]]] - [:span.navigate-icon {on-click on-navigate} i/navigate]]]]))) + [:span.navigate-icon {:style {:visibility (when (not destination) "hidden")} + :on-click on-navigate} i/navigate]]]])))