Skip to content

Commit f8fd50c

Browse files
committed
Try fixing context
1 parent b1ea2a0 commit f8fd50c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

node_package/src/context.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ export type Context = Window | typeof globalThis;
1818
/**
1919
* Get the context, be it window or global
2020
*/
21-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
22-
export default function context(this: void): Context | void {
23-
return (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || this;
21+
export default function context(): Context {
22+
return (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || globalThis;
2423
}
2524

2625
export function isWindow(ctx: Context): ctx is Window {

0 commit comments

Comments
 (0)