From 9d0a48ba003afab2903e2167267fd2cae4e6d74e Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Sun, 14 Mar 2021 21:44:03 -0700 Subject: [PATCH] clear response if range goes back to null I don't think this ever happens, but just in case, it'd be confusing if the list didn't clear. --- ui/src/List/VideoList.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/List/VideoList.tsx b/ui/src/List/VideoList.tsx index d249eca..81b595d 100644 --- a/ui/src/List/VideoList.tsx +++ b/ui/src/List/VideoList.tsx @@ -62,13 +62,15 @@ const VideoList = ({ } setResponse(r); }; - if (range90k != null) { + if (range90k !== null) { doFetch(abort.signal, range90k); const timeout = setTimeout(() => setShowLoading(true), 1000); return () => { abort.abort(); clearTimeout(timeout); }; + } else { + setResponse(null); } }, [range90k, snackbars, stream]);