File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ export async function openApi<
6969 // This is nuts, but there are testing frameworks or some other things
7070 // that seem to set window in Node. The OpenAPI infra will fail under that
7171 // circumstance.
72- const window = globalThis . window ;
73- if ( window ) {
74- delete ( globalThis as { window : unknown } ) . window ;
72+ const _window = global . window ;
73+ if ( _window ) {
74+ delete ( global as { window : unknown } ) . window ;
7575 }
7676
7777 app . locals . openApiSpecification = await new OpenAPIFramework ( { apiDoc : apiSpec } )
@@ -81,8 +81,8 @@ export async function openApi<
8181 app . locals . logger . error ( error , 'Failed to parse and load OpenAPI spec' ) ;
8282 } ) ;
8383
84- if ( window ) {
85- ( globalThis as { window : unknown } ) . window = window ;
84+ if ( _window ) {
85+ ( global as { window : unknown } ) . window = _window ;
8686 } ;
8787
8888 const defaultOptions : OAPIOpts = {
You can’t perform that action at this time.
0 commit comments