Simplify error catching
This commit is contained in:
1 parent
00163d2f44
commit
8a783ba9f6
41 files changed
+93
-113
No files matched your search
@@ -11,9 +11,8 @@ export default function Component({ service }) {
|
||||
|
||||
const { data: torrentData, error: torrentError } = useWidgetAPI(widget);
|
||||
|
||||
if (torrentError || torrentData?.error) {
|
||||
const finalError = torrentError ?? torrentData.error;
|
||||
return <Container error={finalError} />;
|
||||
if (torrentError) {
|
||||
return <Container error={torrentError} />;
|
||||
}
|
||||
|
||||
if (!torrentData) {
|
||||
|
||||
Reference in new issue
Block a user