File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/LiveDevelopment/BrowserScripts Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -4301,18 +4301,21 @@ function RemoteFunctions(config = {}) {
43014301 _hotCorner = new HotCorner ( ) ;
43024302 _hotCorner . updateState ( config . mode === 'preview' ) ;
43034303 }
4304- _requestConfigRefresh ( ) ;
43054304 } ) ;
43064305 } else {
43074306 // or if the DOM is already ready then init directly
4308- setTimeout ( ( ) => {
4309- if ( ! _hotCorner && ! isUnitTestWindow ) {
4310- _hotCorner = new HotCorner ( ) ;
4311- _hotCorner . updateState ( config . mode === 'preview' ) ;
4312- }
4313- } , 0 ) ;
4307+ if ( ! _hotCorner && ! isUnitTestWindow ) {
4308+ _hotCorner = new HotCorner ( ) ;
4309+ _hotCorner . updateState ( config . mode === 'preview' ) ;
4310+ }
43144311 }
43154312
4313+ // we need to refresh the config once the load is completed
4314+ // this is important because messageBroker gets ready for use only when load fires
4315+ window . addEventListener ( 'load' , function ( ) {
4316+ _requestConfigRefresh ( ) ;
4317+ } ) ;
4318+
43164319 let customReturns = { } ;
43174320 customReturns = { // we have to do this else the minifier will strip the customReturns variable
43184321 ...customReturns ,
You can’t perform that action at this time.
0 commit comments