Fix error during cljs compilation with prod profile

This commit is contained in:
Roman Volosovskyi 2019-03-18 09:39:59 +02:00
parent 298f000fcb
commit c61ce1892f
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,7 @@
(ns status-im.utils.core (ns status-im.utils.core
(:require [clojure.string :as str] (:require [clojure.string :as str]
[cljs.tools.reader.edn :as edn] #?(:cljs [cljs.tools.reader.edn :as edn]
:clj [clojure.tools.reader.edn :as edn])
[taoensso.timbre :as log])) [taoensso.timbre :as log]))
(defn truncate-str (defn truncate-str
@ -66,8 +67,9 @@
[key coll] [key coll]
(into {} (map #(vector (key %) %) coll))) (into {} (map #(vector (key %) %) coll)))
(defn safe-read-message-content [content] #?(:cljs
(try (defn safe-read-message-content [content]
(edn/read-string content) (try
(catch :default e (edn/read-string content)
(log/warn "failed to transform message with " e)))) (catch :default e
(log/warn "failed to transform message with " e)))))