mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-03-27 16:00:57 -04:00
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.
This commit is contained in:
parent
718a9a5dc8
commit
9d0a48ba00
@ -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]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user