From eab6dd79c89f0817bed075e398bb30ff0c7c0f14 Mon Sep 17 00:00:00 2001 From: virvar Date: Fri, 20 May 2016 10:55:17 +0300 Subject: [PATCH] Handle empty photo path Former-commit-id: 62fb91fba64493eef895bc65e19cae622eb4a115 --- src/syng_im/components/chat_icon/screen.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/syng_im/components/chat_icon/screen.cljs b/src/syng_im/components/chat_icon/screen.cljs index 028a6cd737..b0acaa568b 100644 --- a/src/syng_im/components/chat_icon/screen.cljs +++ b/src/syng_im/components/chat_icon/screen.cljs @@ -26,7 +26,7 @@ (defview chat-icon-view [chat-id group-chat name color online styles] [photo-path [:chat-photo chat-id]] [view (:container styles) - (if photo-path + (if (and photo-path (not (empty? photo-path))) [chat-icon photo-path styles] [default-chat-icon name color styles]) (when (not group-chat) @@ -81,7 +81,7 @@ :default-chat-icon (st/default-chat-icon-profile color) :default-chat-icon-text st/default-chat-icon-text}] [view (:container styles) - (if photo-path + (if (and photo-path (not (empty? photo-path))) [chat-icon photo-path styles] [default-chat-icon name color styles]) [contact-online online styles]]))