Fix serverMiddleware as express app without path

This commit is contained in:
Sebastien Chopin 2017-10-16 16:36:21 +02:00
parent df2af66355
commit 7cff6cd666

View File

@ -186,7 +186,7 @@ export default class Renderer extends Tapable {
}
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
if (src) handler.$src = src