fix(testing): nullcheck polyfills in ng component testing (#16411)
This commit is contained in:
parent
c963393e53
commit
1ad7e3de48
@ -200,10 +200,15 @@ function normalizeBuildTargetOptions(
|
|||||||
return polyfill;
|
return polyfill;
|
||||||
};
|
};
|
||||||
// paths need to be unix paths for angular devkit
|
// paths need to be unix paths for angular devkit
|
||||||
buildOptions.polyfills =
|
if (buildOptions.polyfills) {
|
||||||
Array.isArray(buildOptions.polyfills) && buildOptions.polyfills.length > 0
|
buildOptions.polyfills =
|
||||||
? (buildOptions.polyfills as string[]).map((p) => handlePolyfillPath(p))
|
Array.isArray(buildOptions.polyfills) &&
|
||||||
: handlePolyfillPath(buildOptions.polyfills as string);
|
buildOptions.polyfills.length > 0
|
||||||
|
? (buildOptions.polyfills as string[]).map((p) =>
|
||||||
|
handlePolyfillPath(p)
|
||||||
|
)
|
||||||
|
: handlePolyfillPath(buildOptions.polyfills as string);
|
||||||
|
}
|
||||||
buildOptions.main = joinPathFragments(offset, buildOptions.main);
|
buildOptions.main = joinPathFragments(offset, buildOptions.main);
|
||||||
buildOptions.index =
|
buildOptions.index =
|
||||||
typeof buildOptions.index === 'string'
|
typeof buildOptions.index === 'string'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user