File tree Expand file tree Collapse file tree 2 files changed +1
-14
lines changed
Expand file tree Collapse file tree 2 files changed +1
-14
lines changed Original file line number Diff line number Diff line change 2525 }
2626 },
2727 "condition" : {
28- "regexFilter" : " /webpack-artifacts/assets/(?: figma_app[^.]+|[0-9a-zA-Z-]+) \\ .min\\ .js(?:\\ .br)?$" ,
28+ "regexFilter" : " /webpack-artifacts/assets/figma_app[^.]+\\ .min\\ .js(?:\\ .br)?$" ,
2929 "resourceTypes" : [" script" ]
3030 }
3131 }
Original file line number Diff line number Diff line change 1- import waitFor from 'p-wait-for'
2-
31import { GROUPS } from './config'
42import { applyGroups } from './shared'
53
6- async function waitRuntimeReady ( ) {
7- const getQueue = ( ) => ( window . webpackChunk_figma_web_bundler ||= [ ] )
8-
9- await waitFor ( ( ) => {
10- const queue = getQueue ( )
11- return typeof queue . push === 'function' && queue . push !== Array . prototype . push
12- } )
13- }
14-
154async function rewriteScript ( ) {
165 const current = document . currentScript as HTMLScriptElement
176 const src = current ?. src
@@ -40,8 +29,6 @@ async function rewriteScript() {
4029
4130 const content = afterRules . replaceAll ( 'delete window.figma' , 'window.figma = undefined' )
4231
43- await waitRuntimeReady ( )
44-
4532 Object . defineProperty ( document , 'currentScript' , {
4633 configurable : true ,
4734 get ( ) {
You can’t perform that action at this time.
0 commit comments