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: statusData, error: statusError } = useWidgetAPI(widget, "status");
|
||||
|
||||
if (statusError || statusData?.error) {
|
||||
const finalError = statusError ?? statusData.error;
|
||||
return <Container error={finalError} />;
|
||||
if (statusError) {
|
||||
return <Container error={statusError} />;
|
||||
}
|
||||
|
||||
if (!statusData) {
|
||||
|
||||
Reference in New Issue
Block a user