mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-17 05:02:23 +08:00
Catch and do nothing to avoid triggering unhandled exception problems
This commit is contained in:
parent
b5cbd96bb8
commit
535bd8dbc1
@ -109,7 +109,9 @@ export async function storybookDevServer(options: Options) {
|
||||
// this is a preview route, the builder has to be started before we can serve it
|
||||
// this handler keeps request to that route pending until the builder is ready to serve it, preventing a 404
|
||||
router.get('/iframe.html', (req, res, next) => {
|
||||
previewStarted.then(() => next());
|
||||
// We need to catch here or node will treat any errors thrown by `previewStarted` as
|
||||
// unhandled and exit (even though they are very much handled below)
|
||||
previewStarted.catch(() => {}).then(() => next());
|
||||
});
|
||||
|
||||
Promise.all([initializedStoryIndexGenerator, listening, usingStatics]).then(async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user