diff --git a/src/status_im/chat/handlers/commands.cljs b/src/status_im/chat/handlers/commands.cljs index 1a3c8d5605..53a7d40c27 100644 --- a/src/status_im/chat/handlers/commands.cljs +++ b/src/status_im/chat/handlers/commands.cljs @@ -43,8 +43,10 @@ callback #(let [result (get-in % [:result :returned]) result' (if (:markup result) (update result :markup cu/generate-hiccup) - result)] - (dispatch [:set-in [:message-data data-type message-id] result']) + result)] + ;; don't fill message data with nil results + (when result' + (dispatch [:set-in [:message-data data-type message-id] result'])) (when (and result (= :preview data-type)) ;; update message in realm with serialized preview (messages/update {:message-id message-id