diff --git a/src/uxbox/data/auth.cljs b/src/uxbox/data/auth.cljs index 7d512fdf9..5e942c46c 100644 --- a/src/uxbox/data/auth.cljs +++ b/src/uxbox/data/auth.cljs @@ -15,6 +15,7 @@ [uxbox.state :as st] [uxbox.schema :as sc] [uxbox.locales :refer (tr)] + [uxbox.data.projects :as dp] [uxbox.ui.messages :as uum])) ;; --- Profile Fetched @@ -83,6 +84,7 @@ (rx/catch on-error) (rx/map :payload) (rx/mapcat #(rx/of (logged-in %) + (dp/fetch-projects) (fetch-profile)))))))) diff --git a/src/uxbox/ui.cljs b/src/uxbox/ui.cljs index ee6a9c65d..8b863031e 100644 --- a/src/uxbox/ui.cljs +++ b/src/uxbox/ui.cljs @@ -59,8 +59,9 @@ (defn app-will-mount [own] - (rs/emit! (uda/fetch-profile) - (dp/fetch-projects)) + (when @auth-data + (rs/emit! (uda/fetch-profile) + (dp/fetch-projects))) own) (def app