Skip to content
Snippets Groups Projects
Commit ffeeddb3 authored by David Sehnal's avatar David Sehnal
Browse files

debug.ts tweak

parent 50945493
No related branches found
No related tags found
No related merge requests found
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
* on node `process.env.NODE_ENV` is available, in webpack build it is automatically set * on node `process.env.NODE_ENV` is available, in webpack build it is automatically set
* by the DefinePlugin to the webpack `mode` value * by the DefinePlugin to the webpack `mode` value
*/ */
let isProductionMode = process.env.NODE_ENV === 'production'; let isProductionMode = typeof process !== 'undefined' && process.env?.NODE_ENV === 'production';
/** /**
* set to true to enable more comprehensive checks and assertions, * set to true to enable more comprehensive checks and assertions,
* mostly used in `mol-gl` and in valence-model calculation * mostly used in `mol-gl` and in valence-model calculation
*/ */
let isDebugMode = process.env.DEBUG === '*' || process.env.DEBUG === 'molstar'; let isDebugMode = typeof process !== 'undefined' && (process.env?.DEBUG === '*' || process.env?.DEBUG === 'molstar');
export { isProductionMode, isDebugMode }; export { isProductionMode, isDebugMode };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment