Skip to content

Commit

Permalink
check both window and self
Browse files Browse the repository at this point in the history
  • Loading branch information
fasidOnGit authored and durran committed Mar 2, 2021
1 parent d2bc284 commit 5ae057d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function isObjectLike(candidate: unknown): candidate is Record<string, un

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

0 comments on commit 5ae057d

Please sign in to comment.