From 283c3277fa535d99afffed88c0d881c506a0388f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 28 May 2016 13:45:35 +0300 Subject: [PATCH] Show proper fallback avatar when no photo is available. --- src/uxbox/ui/settings/profile.cljs | 2 +- src/uxbox/ui/users.cljs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/uxbox/ui/settings/profile.cljs b/src/uxbox/ui/settings/profile.cljs index 4e2fb0817d..5e09497e59 100644 --- a/src/uxbox/ui/settings/profile.cljs +++ b/src/uxbox/ui/settings/profile.cljs @@ -130,7 +130,7 @@ (rs/emit! (udu/update-photo file)) (dom/clean-value! target)))] (let [{:keys [photo]} (rum/react profile-l) - photo (if (str/empty? photo) + photo (if (or (str/empty? photo) (nil? photo)) "images/avatar.jpg" photo)] (html diff --git a/src/uxbox/ui/users.cljs b/src/uxbox/ui/users.cljs index e7ef8ae908..e2fcd08b0c 100644 --- a/src/uxbox/ui/users.cljs +++ b/src/uxbox/ui/users.cljs @@ -58,10 +58,9 @@ [own] (let [profile (rum/react profile-l) local (:rum/local own) - photo (if (str/empty? (:photo profile)) + photo (if (str/empty? (:photo profile "")) "/images/avatar.jpg" (:photo profile))] - (html [:div.user-zone {:on-mouse-enter #(swap! local assoc :open true) :on-mouse-leave #(swap! local assoc :open false)}