fix(router): do not reuse common children with different parents

This commit is contained in:
Brian Ford
2015-09-09 12:00:31 -07:00
parent 8aec215ca0
commit 77e8304fc4
2 changed files with 28 additions and 2 deletions

View File

@ -248,7 +248,7 @@ export class Router {
return this._outlet.canReuse(instruction.component)
.then((result) => {
instruction.component.reuse = result;
if (isPresent(this._childRouter) && isPresent(instruction.child)) {
if (result && isPresent(this._childRouter) && isPresent(instruction.child)) {
return this._childRouter._canReuse(instruction.child);
}
});