diff --git a/src/parser/utils.ts b/src/parser/utils.ts index 905e8aa6..d31266ca 100644 --- a/src/parser/utils.ts +++ b/src/parser/utils.ts @@ -77,7 +77,7 @@ export function isObjectLike(candidate: unknown): candidate is Record(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); }