mirror of
https://github.com/penpot/penpot.git
synced 2026-09-11 14:39:35 +00:00
⏪ Backport transit and plugins hardening compatibility issue
From staging
This commit is contained in:
parent
839754715a
commit
eba4f15bba
@ -8,6 +8,8 @@
|
|||||||
(:require
|
(:require
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.common.logging :as log]
|
[app.common.logging :as log]
|
||||||
|
[app.common.time :as ct]
|
||||||
|
[app.common.transit :as t]
|
||||||
[app.common.types.objects-map]
|
[app.common.types.objects-map]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.main.data.auth :as da]
|
[app.main.data.auth :as da]
|
||||||
@ -100,6 +102,15 @@
|
|||||||
|
|
||||||
(defn ^:export init
|
(defn ^:export init
|
||||||
[options]
|
[options]
|
||||||
|
;; WORKAROUND: we set this really not usefull property for signal a
|
||||||
|
;; sideffect and prevent GCC remove it. We need it because we need
|
||||||
|
;; to populate the Date prototype with transit related properties
|
||||||
|
;; before SES hardning is applied on loading MCP plugin
|
||||||
|
(unchecked-set js/globalThis "penpotStartDate"
|
||||||
|
(-> (ct/now)
|
||||||
|
(t/encode-str)
|
||||||
|
(t/decode-str)))
|
||||||
|
|
||||||
;; Before initializing anything, check if the browser has loaded
|
;; Before initializing anything, check if the browser has loaded
|
||||||
;; stale JS from a previous deployment. If so, do a hard reload so
|
;; stale JS from a previous deployment. If so, do a hard reload so
|
||||||
;; the browser fetches fresh assets matching the current index.html.
|
;; the browser fetches fresh assets matching the current index.html.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user