[FIX] component: properly handle wrapper component and slots

closes #297
This commit is contained in:
Géry Debongnie
2019-09-22 22:24:24 +02:00
parent 78a4550ebb
commit 82a6961b3a
5 changed files with 124 additions and 105 deletions
+2 -2
View File
@@ -347,8 +347,8 @@ export class QWeb extends EventBus {
if (parentContext) {
ctx.templates = Object.create(parentContext.templates);
ctx.variables = Object.create(parentContext.variables);
ctx.nextID = parentContext.parentNode! + 1;
ctx.parentNode = parentContext.parentNode!;
ctx.nextID = parentContext.nextID + 1;
ctx.parentNode = parentContext.parentNode || ctx.nextID++;
ctx.allowMultipleRoots = true;
ctx.hasParentWidget = true;
ctx.shouldDefineResult = false;
+1 -1
View File
@@ -13,6 +13,6 @@ export class RouteComponent extends Component<any, {}, {}> {
`;
get routeComponent(): any {
return this.env.router.currentRoute && this.env.router.currentRoute.component;
return this.env.router.currentRoute && this.env.router.currentRoute.component;
}
}