fix: add return value for additionalRegistryURLs concat in resolveRegistryUrls (#16334)

This commit is contained in:
Johannes Feichtner 2022-06-30 07:06:22 +02:00 committed by GitHub
parent 5b115d41c3
commit 3b8bd95fe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,13 +219,13 @@ function resolveRegistryUrls(
resolvedUrls = [...customUrls]; resolvedUrls = [...customUrls];
} else if (is.nonEmptyArray(defaultRegistryUrls)) { } else if (is.nonEmptyArray(defaultRegistryUrls)) {
resolvedUrls = [...defaultRegistryUrls]; resolvedUrls = [...defaultRegistryUrls];
resolvedUrls.concat(additionalRegistryUrls ?? []); resolvedUrls = resolvedUrls.concat(additionalRegistryUrls ?? []);
} else if (is.function_(datasource.defaultRegistryUrls)) { } else if (is.function_(datasource.defaultRegistryUrls)) {
resolvedUrls = [...datasource.defaultRegistryUrls()]; resolvedUrls = [...datasource.defaultRegistryUrls()];
resolvedUrls.concat(additionalRegistryUrls ?? []); resolvedUrls = resolvedUrls.concat(additionalRegistryUrls ?? []);
} else if (is.nonEmptyArray(datasource.defaultRegistryUrls)) { } else if (is.nonEmptyArray(datasource.defaultRegistryUrls)) {
resolvedUrls = [...datasource.defaultRegistryUrls]; resolvedUrls = [...datasource.defaultRegistryUrls];
resolvedUrls.concat(additionalRegistryUrls ?? []); resolvedUrls = resolvedUrls.concat(additionalRegistryUrls ?? []);
} }
return massageRegistryUrls(resolvedUrls); return massageRegistryUrls(resolvedUrls);
} }