feat(router): add a validation to make sure pathMatch is set correctly
This commit is contained in:
@ -542,4 +542,8 @@ function validateNode(route: Route): void {
|
||||
throw new Error(
|
||||
`Invalid route configuration of route '{path: "${route.path}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`);
|
||||
}
|
||||
if (route.pathMatch !== undefined && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {
|
||||
throw new Error(
|
||||
`Invalid configuration of route '${route.path}': pathMatch can only be set to 'prefix' or 'full'`);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user