[FIX] app: validate props for root component in dev mode

Before this commit, only sub components were validated.
This commit is contained in:
Géry Debongnie
2022-05-22 11:01:02 +02:00
parent 1fe0bf08b1
commit 586033fd95
2 changed files with 19 additions and 0 deletions
+3
View File
@@ -60,6 +60,9 @@ export class App<
mount(target: HTMLElement, options?: MountOptions): Promise<Component<P, E> & InstanceType<T>> {
App.validateTarget(target);
if (this.dev) {
this.helpers.validateProps(this.Root, this.props);
}
const node = this.makeNode(this.Root, this.props);
const prom = this.mountNode(node, target, options);
this.root = node;