Fix error during cljs compilation with prod profile
This commit is contained in:
parent
298f000fcb
commit
c61ce1892f
|
@ -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)))))
|
||||||
|
|
Loading…
Reference in New Issue