Skip to content

Commit

Permalink
Merge pull request #231 from SasanFarrokh/patch-1
Browse files Browse the repository at this point in the history
Fix overriding Storybook version through environment variable
  • Loading branch information
ghengeveld committed Jan 12, 2021
2 parents c40a0db + edc8a68 commit f1f0046
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/lib/getStorybookInfo.js
Expand Up @@ -68,11 +68,11 @@ const disregard = () => neverResolve;
const findViewlayer = async ({ env }) => {
// Allow setting Storybook version via CHROMATIC_STORYBOOK_VERSION='react@4.0-alpha.8' for unusual cases
if (env.CHROMATIC_STORYBOOK_VERSION) {
const [viewLayer, storybookVersion] = env.CHROMATIC_STORYBOOK_VERSION.split('@');
if (!viewLayer || !storybookVersion) {
const [viewLayer, version] = env.CHROMATIC_STORYBOOK_VERSION.split('@');
if (!viewLayer || !version) {
throw new Error('CHROMATIC_STORYBOOK_VERSION was provided but could not be used');
}
return { viewLayer, storybookVersion };
return { viewLayer, version };
}

// Try to find the Storybook viewlayer package
Expand Down

0 comments on commit f1f0046

Please sign in to comment.