From c2409ad6644bd2c340dc0e8b8fa9f246dc7627b0 Mon Sep 17 00:00:00 2001 From: Asad Dhamani Date: Fri, 1 Feb 2019 19:22:33 +0530 Subject: [PATCH] Fix null is not an object error for invalid URLs Signed-off-by: Julien Eluard --- src/status_im/browser/core.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/status_im/browser/core.cljs b/src/status_im/browser/core.cljs index 4844a25f29..f07ab3fc57 100644 --- a/src/status_im/browser/core.cljs +++ b/src/status_im/browser/core.cljs @@ -81,7 +81,7 @@ (defn check-if-phishing-url [{:keys [history history-index] :as browser}] (let [history-host (http/url-host (try (nth history history-index) (catch js/Error _)))] - (assoc browser :unsafe? (dependencies/phishing-detect history-host)))) + (cond-> browser history-host (assoc :unsafe? (dependencies/phishing-detect history-host))))) (def ipfs-proto-code "e3") (def swarm-proto-code "e4")