[IMP] router: navigate now returns more information

This commit is contained in:
Géry Debongnie
2019-08-06 07:48:58 +02:00
parent 3db6f0a643
commit aa268937a7
2 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -108,7 +108,7 @@ export class Router {
}
}
async navigate(to: Destination): Promise<void> {
async navigate(to: Destination): Promise<boolean> {
const path = this.destToPath(to);
const initialName = this.currentRouteName;
const result = await this.matchAndApplyRules(path);
@@ -123,7 +123,9 @@ export class Router {
}
if (this.currentRouteName !== initialName) {
this.env.qweb.forceUpdate();
return true;
}
return false;
}
destToPath(dest: Destination): string {