aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/render/CategoryPill.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/CategoryPill.tsx b/src/render/CategoryPill.tsx
index e5d8f96e..f8ec1791 100644
--- a/src/render/CategoryPill.tsx
+++ b/src/render/CategoryPill.tsx
@@ -43,8 +43,10 @@ export class CategoryPill {
this.root.render(<CategoryPillComponent ref={this.ref} vote={vote} />);
if (this.unsavedState) {
- this.ref.current?.setState(this.unsavedState);
- this.unsavedState = null;
+ GenericUtils.wait(() => this.ref.current).then(() => {
+ this.ref.current?.setState(this.unsavedState);
+ this.unsavedState = null;
+ });
}
if (onMobileYouTube) {