From 2ecb19911383800097b5595ebfba3eaf5f68805c Mon Sep 17 00:00:00 2001 From: michaelhly Date: Tue, 9 Aug 2022 23:15:22 -0400 Subject: [PATCH] Don't check window for Node.js env check --- packages/solana-contrib/src/utils/printAccountOwners.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/solana-contrib/src/utils/printAccountOwners.ts b/packages/solana-contrib/src/utils/printAccountOwners.ts index 483649e06..25c952416 100644 --- a/packages/solana-contrib/src/utils/printAccountOwners.ts +++ b/packages/solana-contrib/src/utils/printAccountOwners.ts @@ -63,7 +63,8 @@ export async function printAccountOwners( if ( expectIndex > 0 && typeof process !== "undefined" && - typeof window === "undefined" + process.versions !== undefined && + process.versions.node !== undefined ) { const maybeProcess: MaybeProcess = process; const targetLine = callStack[expectIndex + 1];