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<
69
69
// This is nuts, but there are testing frameworks or some other things
70
70
// that seem to set window in Node. The OpenAPI infra will fail under that
71
71
// 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 ;
75
75
}
76
76
77
77
app . locals . openApiSpecification = await new OpenAPIFramework ( { apiDoc : apiSpec } )
@@ -81,8 +81,8 @@ export async function openApi<
81
81
app . locals . logger . error ( error , 'Failed to parse and load OpenAPI spec' ) ;
82
82
} ) ;
83
83
84
- if ( window ) {
85
- ( globalThis as { window : unknown } ) . window = window ;
84
+ if ( _window ) {
85
+ ( global as { window : unknown } ) . window = _window ;
86
86
} ;
87
87
88
88
const defaultOptions : OAPIOpts = {
You can’t perform that action at this time.
0 commit comments