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
(: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]))
(defn truncate-str
@ -66,8 +67,9 @@
[key coll]
(into {} (map #(vector (key %) %) coll)))
(defn safe-read-message-content [content]
(try
(edn/read-string content)
(catch :default e
(log/warn "failed to transform message with " e))))
#?(:cljs
(defn safe-read-message-content [content]
(try
(edn/read-string content)
(catch :default e
(log/warn "failed to transform message with " e)))))