mirror of
https://github.com/penpot/penpot.git
synced 2025-02-01 11:59:17 -05:00
Fix logic
This commit is contained in:
parent
157cc5a994
commit
e4f01d1d5e
1 changed files with 3 additions and 5 deletions
|
@ -283,13 +283,11 @@
|
||||||
(when @open?
|
(when @open?
|
||||||
[:& sets-list {:selected-set-id selected-set-id}])]))
|
[:& sets-list {:selected-set-id selected-set-id}])]))
|
||||||
|
|
||||||
|
|
||||||
(defn dev-or-preview-url? [url]
|
(defn dev-or-preview-url? [url]
|
||||||
(let [host (-> url js/URL. .-host)
|
(let [host (-> url js/URL. .-host)
|
||||||
pure-host (first (str/split host #":"))
|
localhost? (= "localhost" (first (str/split host #":")))
|
||||||
domain (second (str/split pure-host #"\."))]
|
pr? (str/ends-with? host "penpot.alpha.tokens.studio")]
|
||||||
(or (= domain "penpot.tokens.studio")
|
(or localhost? pr?)))
|
||||||
(= pure-host "localhost"))))
|
|
||||||
|
|
||||||
(defn location-url-dev-or-preview-url!? []
|
(defn location-url-dev-or-preview-url!? []
|
||||||
(dev-or-preview-url? js/window.location.href))
|
(dev-or-preview-url? js/window.location.href))
|
||||||
|
|
Loading…
Add table
Reference in a new issue