mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] component: proper error message in dev mode in some cases
This commit is contained in:
committed by
Aaron Bohy
parent
72962f1dd1
commit
6639d361c3
@@ -39,6 +39,11 @@ export const validateProps = function (name: string | typeof Component, props: a
|
||||
typeof name !== "string" ? name : parent.constructor.components[name]
|
||||
) as typeof Component;
|
||||
|
||||
if (!ComponentClass) {
|
||||
// this is an error, wrong component. We silently return here instead so the
|
||||
// error is triggered by the usual path ('component' function)
|
||||
return;
|
||||
}
|
||||
applyDefaultProps(props, ComponentClass);
|
||||
|
||||
let propsDef = getPropDescription(ComponentClass.props);
|
||||
|
||||
Reference in New Issue
Block a user