[FIX] component: strict check of deep argument truth value

With this commit, we make sure that the `render` method was explicitely
called with the deep === true argument, instead of assuming that it is a
boolean.  This prevents errors when some unrelated value is given to the
render method. This could happen in some cases, such as

useBus(someBus, 'someevent', this.render)

In that case, the `useBus` code would simply call the this.render with a
customevent, which would be considered truthy before, and not anymore
This commit is contained in:
Géry Debongnie
2022-04-11 10:52:27 +02:00
committed by Sam Degueldre
parent 1179e84971
commit 7d14db7d31
5 changed files with 66 additions and 4 deletions
+1 -1
View File
@@ -37,6 +37,6 @@ export class Component<Props = any, Env = any> {
setup() {}
render(deep: boolean = false) {
this.__owl__.render(deep);
this.__owl__.render(deep === true);
}
}