router icon indicating copy to clipboard operation
router copied to clipboard

NavigationInstruction does not add a path separator when the fragment is empty

Open firelizzard18 opened this issue 7 years ago • 2 comments

I'm submitting a bug report

  • Library Version: master

  • JSPM Version JSPM 0.16.32

Current behavior: I have an app. One of the app's routes is first, which becomes #/first. first has routes, one of which is second, which becomes #/firstsecond. This fails with 'route not found'.

Expected/desired behavior: Instead of #/firstsecond, it should be #/first/second.

Fix: Line 173 of navigation-instruction:

 if (nonEmptyRoute) {
-    fragment = nonEmptyRoute.route;
+    fragment = `/${nonEmptyRoute.route}`;
 }

firelizzard18 avatar Jul 26 '17 01:07 firelizzard18