[IMP] component: display better error message if render is empty

closes #446
This commit is contained in:
Géry Debongnie
2019-11-14 15:33:45 +01:00
parent 4aea093ed9
commit 54e1734f2f
3 changed files with 23 additions and 10 deletions
+2 -6
View File
@@ -236,9 +236,7 @@ QWeb.addDirective({
varCode = `{${content}}`;
}
ctx.addLine(
`this.recursiveFns['${subTemplateName}'].call(this, context, Object.assign({}, extra, {parentNode: c${
ctx.parentNode
}, fiber: {vars: ${varCode}, scope}}));`
`this.recursiveFns['${subTemplateName}'].call(this, context, Object.assign({}, extra, {parentNode: c${ctx.parentNode}, fiber: {vars: ${varCode}, scope}}));`
);
return true;
}
@@ -307,9 +305,7 @@ QWeb.addDirective({
!node.children[0].hasAttribute("t-key");
if (shouldWarn) {
console.warn(
`Directive t-foreach should always be used with a t-key! (in template: '${
ctx.templateName
}')`
`Directive t-foreach should always be used with a t-key! (in template: '${ctx.templateName}')`
);
}