From 43a9ba0f9e62705c1a42de17a98687828f8ecd77 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 23 Aug 2021 19:51:58 -0400 Subject: Fix keybind being flaky --- src/render/SkipNotice.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/render') diff --git a/src/render/SkipNotice.tsx b/src/render/SkipNotice.tsx index bcba9d14..24f98369 100644 --- a/src/render/SkipNotice.tsx +++ b/src/render/SkipNotice.tsx @@ -54,7 +54,7 @@ class SkipNotice { } setShowKeybindHint(value: boolean): void { - this.skipNoticeRef.current.setState({ + this.skipNoticeRef?.current?.setState({ showKeybindHint: value }); } @@ -69,7 +69,7 @@ class SkipNotice { } toggleSkip(): void { - this.skipNoticeRef.current.prepAction(SkipNoticeAction.Unskip); + this.skipNoticeRef?.current?.prepAction(SkipNoticeAction.Unskip); } } -- cgit v1.2.3