From 7cff6cd666337c7f4bb7f2ecb20ec5ab491a28b2 Mon Sep 17 00:00:00 2001 From: Sebastien Chopin Date: Mon, 16 Oct 2017 16:36:21 +0200 Subject: [PATCH] Fix serverMiddleware as express app without path --- lib/core/renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/renderer.js b/lib/core/renderer.js index dd0b5ddf8e..14bbea5482 100644 --- a/lib/core/renderer.js +++ b/lib/core/renderer.js @@ -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