Fix race condition causing full video label not to display

This commit is contained in:
Ajay 2022-11-08 13:50:56 -05:00
parent cd7d74fb33
commit 00ef3856ca

View file

@ -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) {