Skip to content

Commit

Permalink
bug: check if process is defined before accessing it
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlin committed Mar 15, 2024
1 parent 703779b commit def8a25
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 def8a25

Please sign in to comment.