diff --git a/packages/core/src/render3/i18n.ts b/packages/core/src/render3/i18n.ts index 6244017d64..443041b5a7 100644 --- a/packages/core/src/render3/i18n.ts +++ b/packages/core/src/render3/i18n.ts @@ -1019,7 +1019,7 @@ function i18nAttributesFirstPass(lView: LView, tView: TView, index: number, valu elementAttributeInternal(previousElementIndex, attrName, value, lView); } // Check if that attribute is a directive input - const dataValue = tNode.inputs && tNode.inputs[attrName]; + const dataValue = tNode.inputs !== null && tNode.inputs[attrName]; if (dataValue) { setInputsForProperty(lView, dataValue, attrName, value); if (ngDevMode) { diff --git a/packages/core/src/render3/instructions/listener.ts b/packages/core/src/render3/instructions/listener.ts index c37d28492d..3425536647 100644 --- a/packages/core/src/render3/instructions/listener.ts +++ b/packages/core/src/render3/instructions/listener.ts @@ -192,7 +192,7 @@ function listenerInternal( // subscribe to directive outputs const outputs = tNode.outputs; let props: PropertyAliasValue|undefined; - if (processOutputs && outputs != null && (props = outputs[eventName])) { + if (processOutputs && outputs !== null && (props = outputs[eventName])) { const propsLength = props.length; if (propsLength) { const lCleanup = getCleanup(lView); diff --git a/packages/core/src/render3/instructions/lview_debug.ts b/packages/core/src/render3/instructions/lview_debug.ts index bbe621beda..6490db105e 100644 --- a/packages/core/src/render3/instructions/lview_debug.ts +++ b/packages/core/src/render3/instructions/lview_debug.ts @@ -167,8 +167,8 @@ export const TNodeConstructor = class TNode implements ITNode { public attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null, // public localNames: (string|number)[]|null, // public initialInputs: (string[]|null)[]|null|undefined, // - public inputs: PropertyAliases|null|undefined, // - public outputs: PropertyAliases|null|undefined, // + public inputs: PropertyAliases|null, // + public outputs: PropertyAliases|null, // public tViews: ITView|ITView[]|null, // public next: ITNode|null, // public projectionNext: ITNode|null, // diff --git a/packages/core/src/render3/instructions/shared.ts b/packages/core/src/render3/instructions/shared.ts index bb3449f376..f2288a477f 100644 --- a/packages/core/src/render3/instructions/shared.ts +++ b/packages/core/src/render3/instructions/shared.ts @@ -801,8 +801,8 @@ export function createTNode( attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null null, // localNames: (string|number)[]|null undefined, // initialInputs: (string[]|null)[]|null|undefined - undefined, // inputs: PropertyAliases|null|undefined - undefined, // outputs: PropertyAliases|null|undefined + null, // inputs: PropertyAliases|null + null, // outputs: PropertyAliases|null null, // tViews: ITView|ITView[]|null null, // next: ITNode|null null, // projectionNext: ITNode|null @@ -825,8 +825,8 @@ export function createTNode( attrs: attrs, localNames: null, initialInputs: undefined, - inputs: undefined, - outputs: undefined, + inputs: null, + outputs: null, tViews: null, next: null, projectionNext: null, diff --git a/packages/core/src/render3/interfaces/node.ts b/packages/core/src/render3/interfaces/node.ts index 66b2684939..bf52d5a1ec 100644 --- a/packages/core/src/render3/interfaces/node.ts +++ b/packages/core/src/render3/interfaces/node.ts @@ -448,20 +448,16 @@ export interface TNode { initialInputs: InitialInputData|null|undefined; /** - * Input data for all directives on this node. - * - * - `undefined` means that the prop has not been initialized yet, - * - `null` means that the prop has been initialized but no inputs have been found. + * Input data for all directives on this node. `null` means that there are no directives with + * inputs on this node. */ - inputs: PropertyAliases|null|undefined; + inputs: PropertyAliases|null; /** - * Output data for all directives on this node. - * - * - `undefined` means that the prop has not been initialized yet, - * - `null` means that the prop has been initialized but no outputs have been found. + * Output data for all directives on this node. `null` means that there are no directives with + * outputs on this node. */ - outputs: PropertyAliases|null|undefined; + outputs: PropertyAliases|null; /** * The TView or TViews attached to this node.