diff --git a/packages/core-app-api/src/app/AppManager.test.tsx b/packages/core-app-api/src/app/AppManager.test.tsx index 467145acfc..c70b43581a 100644 --- a/packages/core-app-api/src/app/AppManager.test.tsx +++ b/packages/core-app-api/src/app/AppManager.test.tsx @@ -518,7 +518,7 @@ describe('Integration Test', () => { , ), ).toThrow( - 'Parameter :thing is duplicated in path /test/:thing/some/:thing', + 'Parameter :thing is duplicated in path test/:thing/some/:thing', ); }); expect(errorLogs).toEqual([ diff --git a/packages/core-app-api/src/routing/RouteResolver.ts b/packages/core-app-api/src/routing/RouteResolver.ts index 31ea23d59f..f17c549bc6 100644 --- a/packages/core-app-api/src/routing/RouteResolver.ts +++ b/packages/core-app-api/src/routing/RouteResolver.ts @@ -82,7 +82,7 @@ function resolveTargetRef( // Find the path that our target route is bound to const resolvedPath = routePaths.get(targetRef); - if (!resolvedPath) { + if (resolvedPath === undefined) { return [undefined, '']; } @@ -154,7 +154,7 @@ function resolveBasePath( // what parameters those are. const diffPaths = refDiffList.slice(0, -1).map(ref => { const path = routePaths.get(ref); - if (!path) { + if (path === undefined) { throw new Error(`No path for ${ref}`); } if (path.includes(':')) { diff --git a/packages/core-app-api/src/routing/validation.ts b/packages/core-app-api/src/routing/validation.ts index d8be7ee9bc..63950b9fdc 100644 --- a/packages/core-app-api/src/routing/validation.ts +++ b/packages/core-app-api/src/routing/validation.ts @@ -41,7 +41,7 @@ export function validateRouteParameters( let fullPath = ''; while (currentRouteRef) { const path = routePaths.get(currentRouteRef); - if (!path) { + if (path === undefined) { throw new Error(`No path for ${currentRouteRef}`); } fullPath = joinPaths(path, fullPath);