From 77e0ab0f8c95ce849a8bd35f78471a40ede9ca07 Mon Sep 17 00:00:00 2001 From: Kalle Ott Date: Fri, 9 Feb 2018 14:44:47 +0100 Subject: [PATCH] fixed regex for backslash replacement to replace all backslashes --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 0be818a..f655892 100644 --- a/index.js +++ b/index.js @@ -62,8 +62,7 @@ module.exports = function router (routesDir, config) { route.path = '/' + path.relative(routesDir, routeFile).replace(extPattern, '') //Fix issue with windows paths - route.path = route.path.replace(/\\/, '/') - + route.path = route.path.replace(/\\/g, '/') } return route })