File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ interface GlobalWithSingleton {
2121 [ SINGLETON_SYMBOL ] ?: SolidLogic
2222}
2323
24- const globalThis = ( typeof window !== 'undefined' ? window : global ) as GlobalWithSingleton
24+ const globalTarget = ( typeof window !== 'undefined' ? window : global ) as GlobalWithSingleton
2525
2626function getOrCreateSingleton ( ) : SolidLogic {
27- if ( ! globalThis [ SINGLETON_SYMBOL ] ) {
27+ if ( ! globalTarget [ SINGLETON_SYMBOL ] ) {
2828 debug . log ( 'SolidLogic: Creating new global singleton instance.' )
29- globalThis [ SINGLETON_SYMBOL ] = createSolidLogic ( { fetch : _fetch } , authSession )
29+ globalTarget [ SINGLETON_SYMBOL ] = createSolidLogic ( { fetch : _fetch } , authSession )
3030 debug . log ( 'Unique quadstore initialized.' )
3131 } else {
3232 debug . log ( 'SolidLogic: Using existing global singleton instance.' )
3333 }
34- return globalThis [ SINGLETON_SYMBOL ] !
34+ return globalTarget [ SINGLETON_SYMBOL ] !
3535}
3636//this const makes solidLogicSingleton global accessible in mashlib
3737const solidLogicSingleton = getOrCreateSingleton ( )
You can’t perform that action at this time.
0 commit comments