mirror of
https://github.com/penpot/penpot.git
synced 2026-05-24 16:38:40 -04:00
⏪ Backport transit and plugins hardening compatibility issue
From staging
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.logging :as log]
|
||||
[app.common.time :as ct]
|
||||
[app.common.transit :as t]
|
||||
[app.common.types.objects-map]
|
||||
[app.config :as cf]
|
||||
[app.main.data.auth :as da]
|
||||
@@ -100,6 +102,15 @@
|
||||
|
||||
(defn ^:export init
|
||||
[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
|
||||
;; stale JS from a previous deployment. If so, do a hard reload so
|
||||
;; the browser fetches fresh assets matching the current index.html.
|
||||
|
||||
Reference in New Issue
Block a user