Default Route redirect Broke from March 15 Merge


#1

Error:
aurelia-logging-console.js:53 ERROR [app-router] Error: A route with name ‘undefined’ could not be found. Check that name: 'undefined' was specified in the route’s config.

Router Merge:


Adds Line:
let redirectLocation = router.generate(newInstruction.config.name, params, instruction.options);

Issue:
config.name (ie Friendly name) now “Undefined” was never required prior to March 15’th Merge, is this now a required property?

Error Thrown from:
var hasRoute = this._recognizer.hasRoute(name);
if ((!this.isConfigured || !hasRoute) && this.parent) {
return this.parent.generate(name, params, options);
}
if (!hasRoute) {
throw new Error(‘A route with name ‘’ + name + ‘’ could not be found. Check that name: \'' + name + '\' was specified in the route’s config.’);
}

My Code: (working prior to March Merge)

let routes = [
  { route: '', redirect: 'login' },
  { route: 'legal',     moduleId: './static/legal',     nav: false },
  { route: 'login',     moduleId: './auth/login',       nav: true, title: 'Login' },
];

config.map(routes);
config.mapUnknownRoutes(instruction => {
router.navigate('');
});

Band-Aid Fix
{ route: ‘login’, name:‘FOO’, moduleId: ‘./auth/login’, nav: true, title: ‘Login’ },

Kinds Regards,
Mike Pisano