mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(dev-infra): convert nullish coalescing operator to plain javascript (#44968)
low version nodejs doesn't support nullish coalescing operator very well PR Close #44968
This commit is contained in:
parent
8dd3f82f94
commit
459cbed33b
1 changed files with 2 additions and 1 deletions
|
|
@ -68,7 +68,8 @@ const captureNgDevPatches = (files, patches) =>
|
|||
patches.forEach(p => _captureNgDevPatch(p[0], p[1], files));
|
||||
const _captureNgDevPatch = (search, replace, files) => {
|
||||
for (const fileName of files) {
|
||||
const currentPatches = ngDevPatches.get(fileName) ?? [];
|
||||
const patches = ngDevPatches.get(fileName);
|
||||
const currentPatches = (patches !== null && patches !== undefined) ? patches : [];
|
||||
ngDevPatches.set(fileName, [...currentPatches, [search, replace]]);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue