mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
Channel can be null if there is no browser
This commit is contained in:
parent
f07dbaf243
commit
4c52896bde
@ -31,7 +31,7 @@ function getOrCreateChannel() {
|
||||
return channel;
|
||||
}
|
||||
|
||||
function getClientApi(channel: Channel, decorateStory: DecorateStoryFunction) {
|
||||
function getClientApi(decorateStory: DecorateStoryFunction, channel?: Channel) {
|
||||
let storyStore: StoryStore;
|
||||
let clientApi: ClientApi;
|
||||
if (
|
||||
@ -59,7 +59,7 @@ export default function start(
|
||||
{ decorateStory }: { decorateStory?: DecorateStoryFunction } = {}
|
||||
) {
|
||||
const channel = getOrCreateChannel();
|
||||
const { clientApi, storyStore } = getClientApi(channel, decorateStory);
|
||||
const { clientApi, storyStore } = getClientApi(decorateStory, channel);
|
||||
const configApi = new ConfigApi({ storyStore });
|
||||
const storyRenderer = new StoryRenderer({ render, channel, storyStore });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user