Merge pull request #11293 from storybookjs/fix/11264-undefined-undefined-in-url-on-init

Composition: Fix undefined/undefined in url on init
This commit is contained in:
Michael Shilman 2020-06-25 06:31:00 +08:00 committed by GitHub
commit 1f01a01fc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 20 deletions

View File

@ -264,7 +264,7 @@ export const init: ModuleFn = ({
const { source }: { source: string } = this;
const [sourceType] = getSourceType(source);
if (sourceType === 'local') {
if (sourceType === 'local' && storyId && viewMode) {
navigate(`/${viewMode}/${storyId}`);
}
});

View File

@ -1 +1 @@
export const version = '6.0.0-beta.34';
export const version = '6.0.0-beta.35';

View File

@ -1,17 +1,17 @@
{
"@storybook/angular": "6.0.0-beta.34",
"@storybook/aurelia": "6.0.0-beta.34",
"@storybook/ember": "6.0.0-beta.34",
"@storybook/html": "6.0.0-beta.34",
"@storybook/marionette": "6.0.0-beta.34",
"@storybook/marko": "6.0.0-beta.34",
"@storybook/mithril": "6.0.0-beta.34",
"@storybook/preact": "6.0.0-beta.34",
"@storybook/rax": "6.0.0-beta.34",
"@storybook/react": "6.0.0-beta.34",
"@storybook/riot": "6.0.0-beta.34",
"@storybook/server": "6.0.0-beta.34",
"@storybook/svelte": "6.0.0-beta.34",
"@storybook/vue": "6.0.0-beta.34",
"@storybook/web-components": "6.0.0-beta.34"
"@storybook/angular": "6.0.0-beta.35",
"@storybook/aurelia": "6.0.0-beta.35",
"@storybook/ember": "6.0.0-beta.35",
"@storybook/html": "6.0.0-beta.35",
"@storybook/marionette": "6.0.0-beta.35",
"@storybook/marko": "6.0.0-beta.35",
"@storybook/mithril": "6.0.0-beta.35",
"@storybook/preact": "6.0.0-beta.35",
"@storybook/rax": "6.0.0-beta.35",
"@storybook/react": "6.0.0-beta.35",
"@storybook/riot": "6.0.0-beta.35",
"@storybook/server": "6.0.0-beta.35",
"@storybook/svelte": "6.0.0-beta.35",
"@storybook/vue": "6.0.0-beta.35",
"@storybook/web-components": "6.0.0-beta.35"
}

View File

@ -212,7 +212,7 @@ export default class StoryStore {
}
}
// If we didn't find a story matching the speficier, we always want to emit CURRENT_STORY_WAS_SET anyway
// If we didn't find a story matching the specifier, we always want to emit CURRENT_STORY_WAS_SET anyway
if (!foundStory && this._channel) {
this._channel.emit(Events.CURRENT_STORY_WAS_SET, this._selection);
}

View File

@ -16,11 +16,11 @@ export const FramesRenderer: FunctionComponent<FramesRendererProps> = ({
refs,
story,
scale,
viewMode,
viewMode = 'story',
refId,
queryParams,
baseUrl,
storyId,
storyId = '*',
}) => {
const stringifiedQueryParams = stringifyQueryParams(queryParams);
const active = getActive(refId);