Fix error on refresh while a folder watch is being set up
Notes: From QA > This error mostly happens if i add a watch folder and before watch folders start to upload and i refresh the app. e is undefined in let {watches: e, removeWatch: n} = t; return 0 === e.length ? (0,... Results in Next throwing Application error: a client-side exception has occurred (see the browser console for more information).
This commit is contained in:
parent
04be2b6a2c
commit
9f58f1eeb3
1 changed files with 2 additions and 2 deletions
|
@ -153,12 +153,12 @@ const Title_ = styled("div")`
|
|||
`;
|
||||
|
||||
interface WatchList {
|
||||
watches: FolderWatch[];
|
||||
watches: FolderWatch[] | undefined;
|
||||
removeWatch: (watch: FolderWatch) => void;
|
||||
}
|
||||
|
||||
const WatchList: React.FC<WatchList> = ({ watches, removeWatch }) => {
|
||||
return watches.length === 0 ? (
|
||||
return (watches ?? []).length === 0 ? (
|
||||
<NoWatches />
|
||||
) : (
|
||||
<WatchesContainer>
|
||||
|
|
Loading…
Reference in a new issue