Skip to content

Commit

Permalink
We need a little bit of async in core-client.
Browse files Browse the repository at this point in the history
cc @ndelangen - composition was broken after remove the `importPolyfills().then` from here.
  • Loading branch information
tmeasday committed Jun 21, 2022
1 parent 48a0bb9 commit ab6dd53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/core-client/src/manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ import Provider from './provider';

const { document } = global;

const rootEl = document.getElementById('root');
renderStorybookUI(rootEl, new Provider());
// We need to wait a promise "tick" to allow all subsequent addons etc to execute
// (alternatively, we could ensure this entry point is always loaded last)
Promise.resolve().then(() => {
const rootEl = document.getElementById('root');
renderStorybookUI(rootEl, new Provider());
});

1 comment on commit ab6dd53

@ndelangen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broken how?

Please sign in to comment.