mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Simplify error catching
This commit is contained in:
@@ -11,9 +11,8 @@ export default function Component({ service }) {
|
||||
|
||||
const { data: indexersData, error: indexersError } = useWidgetAPI(widget, "indexers");
|
||||
|
||||
if (indexersError || indexersData?.error) {
|
||||
const finalError = indexersError ?? indexersData.error;
|
||||
return <Container error={finalError} />;
|
||||
if (indexersError) {
|
||||
return <Container error={indexersError} />;
|
||||
}
|
||||
|
||||
if (!indexersData) {
|
||||
|
||||
Reference in New Issue
Block a user