mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(common): eliminate redundant iterator-to-array conversion (#60884)
Simplifies code by removing unnecessary `Array.from` usage. PR Close #60884
This commit is contained in:
parent
d1731687e1
commit
c90eea2cd1
1 changed files with 2 additions and 3 deletions
|
|
@ -127,9 +127,8 @@ export class PreconnectLinkChecker {
|
|||
|
||||
private queryPreconnectLinks(): Set<string> {
|
||||
const preconnectUrls = new Set<string>();
|
||||
const selector = 'link[rel=preconnect]';
|
||||
const links: HTMLLinkElement[] = Array.from(this.document.querySelectorAll(selector));
|
||||
for (let link of links) {
|
||||
const links = this.document.querySelectorAll<HTMLLinkElement>('link[rel=preconnect]');
|
||||
for (const link of links) {
|
||||
const url = getUrl(link.href, this.window!);
|
||||
preconnectUrls.add(url.origin);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue