Skip to content

Commit c34981c

Browse files
committed
chore: remove check for clearTimeout on onOnline method
1 parent e168663 commit c34981c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/components/common/Banner/Banner.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ export const Banner = () => {
8686
const onlineTimer = useRef<ReturnType<typeof setTimeout>>(null)
8787

8888
const onOnline = () => {
89-
if (onlineTimer.current) {
90-
clearTimeout(onlineTimer.current)
91-
}
92-
89+
clearTimeout(onlineTimer.current)
9390
setShowOnlineBanner(true)
9491
onlineTimer.current = setTimeout(() => setShowOnlineBanner(false), ONLINE_BANNER_TIMEOUT)
9592
}

0 commit comments

Comments
 (0)