mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -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?
|
||||
[:& sets-list {:selected-set-id selected-set-id}])]))
|
||||
|
||||
|
||||
(defn dev-or-preview-url? [url]
|
||||
(let [host (-> url js/URL. .-host)
|
||||
pure-host (first (str/split host #":"))
|
||||
domain (second (str/split pure-host #"\."))]
|
||||
(or (= domain "penpot.tokens.studio")
|
||||
(= pure-host "localhost"))))
|
||||
localhost? (= "localhost" (first (str/split host #":")))
|
||||
pr? (str/ends-with? host "penpot.alpha.tokens.studio")]
|
||||
(or localhost? pr?)))
|
||||
|
||||
(defn location-url-dev-or-preview-url!? []
|
||||
(dev-or-preview-url? js/window.location.href))
|
||||
|
|
Loading…
Add table
Reference in a new issue