Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[fix] fix for process is undefined (#2376)

Igor Dykhtaa958586dd3c8
diff --git a/src/utils/src/utils.ts b/src/utils/src/utils.ts
index 6221dd6b3..eaa980296 100644
--- a/src/utils/src/utils.ts
+++ b/src/utils/src/utils.ts
@@ -214,7 +214,7 @@ export function hasPortableWidth(breakPointValues: {palm: number; desk: number})
}
export function isTest(): boolean {
- return process?.env?.NODE_ENV === 'test';
+ return typeof process !== 'undefined' && process?.env?.NODE_ENV === 'test';
}
/**