Skip to content

Commit

Permalink
Fixed rare case if the envPrefix is undefined in `stringifyProcessE…
Browse files Browse the repository at this point in the history
…nvs()` function
  • Loading branch information
mrauhu committed Jan 7, 2022
1 parent a229f3c commit 50781f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/storybook-builder-vite/envs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function stringifyProcessEnvs(raw: EnvsRaw, envPrefix: UserConfig['envPre
if (
allowedEnvVariables.includes(key) ||
(Array.isArray(envPrefix) && !!envPrefix.find((prefix) => key.startsWith(prefix))) ||
key.startsWith(envPrefix)
(typeof envPrefix === 'string' && key.startsWith(envPrefix))
) {
acc[`import.meta.env.${key}`] = JSON.stringify(value);
updatedRaw[key] = value;
Expand Down

0 comments on commit 50781f7

Please sign in to comment.