mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
fix minor flood without a backend error
This commit is contained in:
parent
5d8b937e9c
commit
94af8044f1
@ -11,11 +11,11 @@ export default function Component({ service }) {
|
||||
|
||||
const { data: torrentData, error: torrentError } = useWidgetAPI(widget, "torrents");
|
||||
|
||||
if (torrentError) {
|
||||
return <Container error={torrentError} />;
|
||||
if (torrentError || !torrentData?.torrents) {
|
||||
return <Container error={torrentError ?? {message: "No torrent data returned"}} />;
|
||||
}
|
||||
|
||||
if (!torrentData) {
|
||||
if (!torrentData || !torrentData.torrents) {
|
||||
return (
|
||||
<Container service={service}>
|
||||
<Block label="flood.leech" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user