Skip to content

Commit

Permalink
check that __DEV__ is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Oct 27, 2023
1 parent e477ad0 commit 55eb480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/utils/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ export function getHermesVersion(): string | undefined {

/** Returns default environment based on __DEV__ */
export function getDefaultEnvironment(): 'development' | 'production' {
return __DEV__ ? 'development' : 'production';
return typeof __DEV__ !== 'undefined' && __DEV__ ? 'development' : 'production';
}

0 comments on commit 55eb480

Please sign in to comment.