mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] component: props values are own property of props object
This commit is contained in:
@@ -32,7 +32,7 @@ export function useComponent(): Component {
|
||||
* Apply default props (only top level).
|
||||
*/
|
||||
function applyDefaultProps<P extends object>(props: P, defaultProps: Partial<P>): P {
|
||||
const result = Object.create(props);
|
||||
const result = Object.assign({} as any, props);
|
||||
for (let propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
result[propName] = defaultProps[propName];
|
||||
|
||||
Reference in New Issue
Block a user