Skip to content

Commit

Permalink
fix passport's process usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cajames committed Feb 27, 2024
1 parent 3ccc77b commit 1fe2974
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/passport/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"@types/axios": "^0.14.0",
"@types/jest": "^29.4.3",
"@types/jwt-encode": "^1.0.1",
"@types/node": "^18.14.2",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.57.1",
Expand Down
7 changes: 5 additions & 2 deletions packages/passport/sdk/src/utils/logger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const shouldLog: boolean = process?.env?.JEST_WORKER_ID === undefined;

const warn = (...args: any[]) => {
if (typeof process === 'undefined') {
return;
}

const shouldLog: boolean = process?.env?.JEST_WORKER_ID === undefined;
if (shouldLog) {
// eslint-disable-next-line no-console
console.warn(...args);
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3719,7 +3719,6 @@ __metadata:
"@types/axios": ^0.14.0
"@types/jest": ^29.4.3
"@types/jwt-encode": ^1.0.1
"@types/node": ^18.14.2
"@types/react": ^18.0.28
"@types/react-dom": ^18.0.11
"@typescript-eslint/eslint-plugin": ^5.57.1
Expand Down

0 comments on commit 1fe2974

Please sign in to comment.