mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
craco: fix env substitution for undefined variable
When an environment variable is not defined, `process.env` returns `undefined` which was used literally as text. Fix by using an empty string if `process.env` returns something falsy. Fixes: https://github.com/pybricks/support/issues/560
This commit is contained in:
+1
-1
@@ -198,7 +198,7 @@ module.exports = {
|
||||
.toString()
|
||||
.replace(
|
||||
/%\w+%/g,
|
||||
(m) => process.env[m.slice(1, m.length - 1)],
|
||||
(m) => process.env[m.slice(1, m.length - 1)] || '',
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user