0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 17:21:17 -05:00

Make config module worker safe.

This commit is contained in:
Andrey Antukh 2020-04-30 17:14:34 +02:00
parent e84a462dde
commit d856b9aae3

View file

@ -8,17 +8,17 @@
;; Copyright (c) 2016-2020 Andrey Antukh <niwi@niwi.nz>
(ns uxbox.config
(:require [goog.object :as gobj]))
(:require [uxbox.util.object :as obj]))
(defn- get-current-origin
[]
(let [location (gobj/get goog.global "location")]
(gobj/get location "origin")))
(let [location (obj/get goog.global "location")]
(obj/get location "origin")))
(let [config (gobj/get goog.global "uxboxConfig")
public-url (gobj/get config "publicURL" "http://localhost:6060")]
(let [config (obj/get goog.global "uxboxConfig")
public-url (obj/get config "publicURL" "http://localhost:6060")]
(def default-language "en")
(def demo-warning (gobj/get config "demoWarning" true))
(def demo-warning (obj/get config "demoWarning" true))
(def url public-url)
(def default-theme "default"))