fix(ivy): jit should handle undefined type in constructor deps (#26956)
PR Close #26956
This commit is contained in:
parent
7dbc103cbe
commit
dc2464eaaa
@ -49,7 +49,10 @@ function reflectDependency(compiler: CompilerFacade, dep: any | any[]): R3Depend
|
|||||||
}
|
}
|
||||||
for (let j = 0; j < dep.length; j++) {
|
for (let j = 0; j < dep.length; j++) {
|
||||||
const param = dep[j];
|
const param = dep[j];
|
||||||
if (param instanceof Optional || param.__proto__.ngMetadataName === 'Optional') {
|
if (param === undefined) {
|
||||||
|
// param may be undefined if type of dep is not set by ngtsc
|
||||||
|
continue;
|
||||||
|
} else if (param instanceof Optional || param.__proto__.ngMetadataName === 'Optional') {
|
||||||
meta.optional = true;
|
meta.optional = true;
|
||||||
} else if (param instanceof SkipSelf || param.__proto__.ngMetadataName === 'SkipSelf') {
|
} else if (param instanceof SkipSelf || param.__proto__.ngMetadataName === 'SkipSelf') {
|
||||||
meta.skipSelf = true;
|
meta.skipSelf = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user