mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] component_node: slightly simplify code
This commit is contained in:
committed by
Sam Degueldre
parent
9fd662fdce
commit
f5d5273c25
@@ -83,7 +83,6 @@ export class ComponentNode<P extends Props = any, E = any> implements VNode<Comp
|
|||||||
|
|
||||||
renderFn: Function;
|
renderFn: Function;
|
||||||
parent: ComponentNode | null;
|
parent: ComponentNode | null;
|
||||||
level: number;
|
|
||||||
childEnv: Env;
|
childEnv: Env;
|
||||||
children: { [key: string]: ComponentNode } = Object.create(null);
|
children: { [key: string]: ComponentNode } = Object.create(null);
|
||||||
refs: any = {};
|
refs: any = {};
|
||||||
@@ -108,7 +107,6 @@ export class ComponentNode<P extends Props = any, E = any> implements VNode<Comp
|
|||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.props = props;
|
this.props = props;
|
||||||
this.parentKey = parentKey;
|
this.parentKey = parentKey;
|
||||||
this.level = parent ? parent.level + 1 : 0;
|
|
||||||
const defaultProps = C.defaultProps;
|
const defaultProps = C.defaultProps;
|
||||||
props = Object.assign({}, props);
|
props = Object.assign({}, props);
|
||||||
if (defaultProps) {
|
if (defaultProps) {
|
||||||
|
|||||||
Reference in New Issue
Block a user