fix #1499 chat: don't persist null properties

This commit is contained in:
Herich 2017-07-26 17:15:57 +02:00 committed by Roman Volosovskyi
parent 389e79d683
commit 63d9301a27
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@
(update result :markup cu/generate-hiccup)
result)]
(dispatch [:set-in [:message-data data-type message-id] result'])
(when (= :preview data-type)
(when (and result (= :preview data-type))
;; update message in realm with serialized preview
(messages/update {:message-id message-id
:preview (prn-str result)}))