diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-02 15:29:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-02 15:40:09 +0200 |
commit | 3da38d6e9f8d600476be276666ac7223aa5f172c (patch) | |
tree | daec25cccb900a0f90fc9d2273099683b42d8551 /client/src/app/shared/shared-custom-markup/custom-markup.service.ts | |
parent | 200eaf5152ca72fe6b05a49caf819e22bd045b37 (diff) | |
download | PeerTube-3da38d6e9f8d600476be276666ac7223aa5f172c.tar.gz PeerTube-3da38d6e9f8d600476be276666ac7223aa5f172c.tar.zst PeerTube-3da38d6e9f8d600476be276666ac7223aa5f172c.zip |
Fetch things in bulk for the homepage
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/custom-markup.service.ts')
-rw-r--r-- | client/src/app/shared/shared-custom-markup/custom-markup.service.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts index 231e52d0a..089728a51 100644 --- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts +++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts | |||
@@ -65,15 +65,15 @@ export class CustomMarkupService { | |||
65 | 65 | ||
66 | for (const selector of Object.keys(this.htmlBuilders)) { | 66 | for (const selector of Object.keys(this.htmlBuilders)) { |
67 | rootElement.querySelectorAll(selector) | 67 | rootElement.querySelectorAll(selector) |
68 | .forEach((e: HTMLElement) => { | 68 | .forEach((e: HTMLElement) => { |
69 | try { | 69 | try { |
70 | const element = this.execHTMLBuilder(selector, e) | 70 | const element = this.execHTMLBuilder(selector, e) |
71 | // Insert as first child | 71 | // Insert as first child |
72 | e.insertBefore(element, e.firstChild) | 72 | e.insertBefore(element, e.firstChild) |
73 | } catch (err) { | 73 | } catch (err) { |
74 | console.error('Cannot inject component %s.', selector, err) | 74 | console.error('Cannot inject component %s.', selector, err) |
75 | } | 75 | } |
76 | }) | 76 | }) |
77 | } | 77 | } |
78 | 78 | ||
79 | const loadedPromises: Promise<boolean>[] = [] | 79 | const loadedPromises: Promise<boolean>[] = [] |