FIX: Remove duplicate route warning, it's just a noop now
This commit is contained in:
parent
4e1f8ec72b
commit
62966b1023
|
@ -72,21 +72,10 @@ class RouteNode {
|
||||||
if (this.name === 'root') {
|
if (this.name === 'root') {
|
||||||
children.forEach(c => c.mapRoutes(router));
|
children.forEach(c => c.mapRoutes(router));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const builder = (children.length === 0) ? undefined : function() {
|
const builder = (children.length === 0) ? undefined : function() {
|
||||||
children.forEach(c => c.mapRoutes(this));
|
children.forEach(c => c.mapRoutes(this));
|
||||||
};
|
};
|
||||||
router.route(this.name, this.opts, builder);
|
router.route(this.name, this.opts, builder);
|
||||||
|
|
||||||
// We can have multiple paths to the same route
|
|
||||||
const paths = Object.keys(this.paths);
|
|
||||||
if (paths.length > 1) {
|
|
||||||
paths.filter(p => p !== this.opts.path).forEach(path => {
|
|
||||||
const newOpts = jQuery.extend({}, this.opts, { path });
|
|
||||||
console.log(`warning: we can't have duplicate route names anymore`, newOpts);
|
|
||||||
// router.route(this.name, newOpts, builder);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue