Skip to content

Commit

Permalink
fix: missing handler in server middleware (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Nov 24, 2021
1 parent 43ba0bf commit 73c5a7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion storybook/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ module.exports = function (app) {
_handler = _handler.default || _handler
}

app.use(_route, _handler)
if (_handler) {
app.use(_route, _handler)
} else {
console.log(`[nuxt-storybook] Middleware ${middleware} has no handler`)
}
}

middlewares.forEach(m => addServerMiddleware(m))
Expand Down

0 comments on commit 73c5a7a

Please sign in to comment.