[FIX] component: make sure props are validated in all cases

closes #379
This commit is contained in:
Géry Debongnie
2019-10-26 22:06:33 +02:00
committed by Aaron Bohy
parent 9779cd196c
commit 4ebe419c56
3 changed files with 26 additions and 6 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ QWeb.utils.validateProps = function(Widget, props: Object) {
// optional prop
break;
}
if (!props[propName]) {
if (!(propName in props)) {
throw new Error(`Missing props '${propsDef[i]}' (component '${Widget.name}')`);
}
}