File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -141,9 +141,18 @@ export class ContextProxy {
141141 for ( const key of GLOBAL_STATE_KEYS ) {
142142 try {
143143 if ( this . isWindowSpecificKey ( key ) ) {
144- // For window-specific keys, get the value using the window-specific key
144+ // For window-specific keys, first try to get the value using the window-specific key
145145 const windowKey = this . getWindowSpecificKey ( key )
146- const value = this . originalContext . globalState . get ( windowKey )
146+ let value = this . originalContext . globalState . get ( windowKey )
147+
148+ // If no window-specific value exists, try to get a global value as fallback
149+ if ( value === undefined ) {
150+ value = this . originalContext . globalState . get ( key )
151+ logger . debug (
152+ `No window-specific value found for ${ windowKey } , using global value for ${ key } : ${ value } ` ,
153+ )
154+ }
155+
147156 this . stateCache . set ( key , value )
148157 logger . debug ( `Loaded window-specific key ${ key } as ${ windowKey } with value: ${ value } ` )
149158 } else {
You can’t perform that action at this time.
0 commit comments