Skip to content

Commit 5ae057d

Browse files
fasidOnGitdurran
authored andcommitted
check both window and self
1 parent d2bc284 commit 5ae057d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parser/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function isObjectLike(candidate: unknown): candidate is Record<string, un
7777

7878
declare let console: { warn(...message: unknown[]): void };
7979
export function deprecate<T extends Function>(fn: T, message: string): T {
80-
if (typeof window === 'undefined' || typeof self === 'undefined') {
80+
if (typeof window === 'undefined' && typeof self === 'undefined') {
8181
// eslint-disable-next-line @typescript-eslint/no-var-requires
8282
return require('util').deprecate(fn, message);
8383
}

0 commit comments

Comments
 (0)