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(); 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) {