Fix null is not an object error for invalid URLs
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
parent
7b0f68fcdb
commit
c2409ad664
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue