From f60831454f9d9494ebaf7ee46b23904f95e03675 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Wed, 26 Oct 2022 20:52:14 -0700 Subject: [PATCH] fix node detection in logger --- src/logger/logger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logger/logger.ts b/src/logger/logger.ts index 6b09c8b..cc3c38d 100644 --- a/src/logger/logger.ts +++ b/src/logger/logger.ts @@ -106,7 +106,7 @@ async function getStaticSourceMaps(): Promise> { ) continue; // make sure .map file exists const fileBuff = await fs.readFile(file + '.map'); - if (URL && typeof Blob !== 'undefined') { + if (typeof window !== 'undefined') { // not running in node // only run this stuff if we are running in a browser window const mappingsWasmBuffer = await fs.readFile( path.join(__dirname, '../../node_modules/source-map/lib/mappings.wasm'),