Skip to content

Commit

Permalink
Fix issue with process global (#1166)
Browse files Browse the repository at this point in the history
* fix process

* chlog
  • Loading branch information
ukrbublik authored Jan 9, 2025
1 parent f6d27b9 commit 0ca4a26
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Changelog
- 6.6.6
- Fix issue with process global (PR #1166) (issue #1165)
- 6.6.5
- Support import fom SQL (`SqlUtils.loadFromSql`) (PR #1103) (issue #911, #593)
- Fixed type issue with SerializedFunction (PR #1103) (issue #1024)
Expand Down
4 changes: 2 additions & 2 deletions packages/core/modules/utils/stuff.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ export const isJsonCompatible = (tpl, obj, bag = {}, path = []) => {
}
};

const isDev = () => (process?.env?.NODE_ENV == "development");
const isTest = () => (process?.env?.NODE_ENV_TEST == "true");
const isDev = () => (typeof process !== "undefined" && process?.env?.NODE_ENV == "development");
const isTest = () => (typeof process !== "undefined" && process?.env?.NODE_ENV_TEST == "true");

export const getLogger = (devMode) => {
if (isTest()) {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/modules/utils/stuff.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ function shallowEqualObjects(objA, objB, deep = false) {
}


const isDev = () => (process?.env?.NODE_ENV == "development");
const isTest = () => (process?.env?.NODE_ENV_TEST == "true");
const isDev = () => (typeof process !== "undefined" && process?.env?.NODE_ENV == "development");
const isTest = () => (typeof process !== "undefined" && process?.env?.NODE_ENV_TEST == "true");

export const getLogger = (devMode) => {
if (isTest()) {
Expand Down

0 comments on commit 0ca4a26

Please sign in to comment.