Fix serverMiddleware as express app without path

This commit is contained in:
Sebastien Chopin 2017-10-16 16:36:21 +02:00
parent 83c25084f1
commit 7afa5e4c13

View File

@ -182,7 +182,7 @@ export default class Renderer extends Tapable {
} }
const handler = m.handler || m const handler = m.handler || m
const path = (((m.prefix !== false) ? this.options.router.base : '') + (m.path ? m.path : '')).replace(/\/\//g, '/') const path = (((m.prefix !== false) ? this.options.router.base : '') + (typeof m.path === 'string' ? m.path : '')).replace(/\/\//g, '/')
// Inject $src and $m to final handler // Inject $src and $m to final handler
if (src) handler.$src = src if (src) handler.$src = src