aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/CategoryPill.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/CategoryPill.tsx')
-rw-r--r--src/render/CategoryPill.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/CategoryPill.tsx b/src/render/CategoryPill.tsx
index 20923fba..3a11e09c 100644
--- a/src/render/CategoryPill.tsx
+++ b/src/render/CategoryPill.tsx
@@ -43,7 +43,7 @@ export class CategoryPill {
}
private async attachToPageInternal(): Promise<void> {
- let referenceNode =
+ let referenceNode =
await waitFor(() => getYouTubeTitleNode());
// Experimental YouTube layout with description on right
@@ -119,6 +119,8 @@ export class CategoryPill {
}
async setSegment(segment: SponsorTime): Promise<void> {
+ await waitFor(() => this.ref.current);
+
if (this.ref.current?.state?.segment !== segment) {
const newState = {
segment,