Ver Fonte

fix(mobile): don't show refresh button when repo is nil

leizhe há 4 anos atrás
pai
commit
ad2c060516
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      src/main/frontend/components/header.cljs

+ 3 - 2
src/main/frontend/components/header.cljs

@@ -223,8 +223,9 @@
            (if refreshing?
              [:div {:class "animate-spin-reverse"}
               svg/refresh]
-             [:div.flex.flex-row.text-center.open-button__inner.items-center
-              (ui/icon "refresh" {:style {:fontSize ui/icon-size}})])])
+             (when (seq repos)
+               [:div.flex.flex-row.text-center.open-button__inner.items-center
+                (ui/icon "refresh" {:style {:fontSize ui/icon-size}})]))])
 
         (repo/sync-status current-repo)