mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-05 23:33:08 +00:00
bug: check if process is defined before accessing it
This commit is contained in:
parent
703779b58f
commit
def8a259ca
@ -37,7 +37,7 @@ export async function defaultLibp2p(
|
|||||||
options?: Partial<CreateLibp2pOptions>,
|
options?: Partial<CreateLibp2pOptions>,
|
||||||
userAgent?: string
|
userAgent?: string
|
||||||
): Promise<Libp2p> {
|
): Promise<Libp2p> {
|
||||||
if (!options?.hideWebSocketInfo && process.env.NODE_ENV !== "test") {
|
if (!options?.hideWebSocketInfo && process?.env?.NODE_ENV !== "test") {
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
console.info(
|
console.info(
|
||||||
"%cIgnore WebSocket connection failures",
|
"%cIgnore WebSocket connection failures",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user