File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -126,12 +126,13 @@ export default globalThis.puter = (function() {
126126 context . services = this . services ;
127127
128128 // Holds the query parameters found in the current URL
129- let URLParams = new URLSearchParams ( globalThis . location ?. search ) ;
129+ let URLParams = new URLSearchParams ( globalThis . sessionStorage ?. getItem ( "puter_search_params" ) || globalThis . location ?. search ) ;
130130
131131 // Figure out the environment in which the SDK is running
132- if ( URLParams . has ( 'puter.app_instance_id' ) )
132+ if ( URLParams . has ( 'puter.app_instance_id' ) ) {
133+ globalThis . sessionStorage ?. setItem ( "puter_search_params" , globalThis . sessionStorage ?. getItem ( "puter_search_params" ) || globalThis . location ?. search )
133134 this . env = 'app' ;
134- else if ( globalThis . puter_gui_enabled === true )
135+ } else if ( globalThis . puter_gui_enabled === true )
135136 this . env = 'gui' ;
136137 else if ( globalThis . WorkerGlobalScope ) {
137138 if ( globalThis . ServiceWorkerGlobalScope ) {
You can’t perform that action at this time.
0 commit comments