Skip to content

Commit

Permalink
chore: use isBrowser from env
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAnansky committed Oct 8, 2024
1 parent 2c1d938 commit dcc5b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fs from 'fs';
import { extname } from 'path';
import * as minimatch from 'minimatch';
import { parseYaml } from './js-yaml';
import { env } from './env';
import { env, isBrowser } from './env';
import { logger, colorize } from './logger';
import * as pluralizeOne from 'pluralize';

Expand All @@ -15,7 +15,7 @@ let fetch: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>)
},
ProxyAgent: (new (arg0: string) => any) | null;

if (typeof window === 'undefined') {
if (!isBrowser) {
// Node.js environment
const undici = require('undici');
fetch = undici.fetch;
Expand Down

0 comments on commit dcc5b5c

Please sign in to comment.