Skip to content

Commit

Permalink
Merge pull request #1921 from waku-org/bug/check-process
Browse files Browse the repository at this point in the history
fix: check if process is defined before accessing it
  • Loading branch information
adklempner authored Mar 17, 2024
2 parents 703779b + def8a25 commit 40c5e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sdk/src/utils/libp2p.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function defaultLibp2p(
options?: Partial<CreateLibp2pOptions>,
userAgent?: string
): Promise<Libp2p> {
if (!options?.hideWebSocketInfo && process.env.NODE_ENV !== "test") {
if (!options?.hideWebSocketInfo && process?.env?.NODE_ENV !== "test") {
/* eslint-disable no-console */
console.info(
"%cIgnore WebSocket connection failures",
Expand Down

0 comments on commit 40c5e0e

Please sign in to comment.