mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
Simplify error catching
This commit is contained in:
@@ -11,9 +11,8 @@ export default function Component({ service }) {
|
||||
|
||||
const { data: statsData, error: statsError } = useWidgetAPI(widget, "status");
|
||||
|
||||
if (statsError || statsData?.error) {
|
||||
const finalError = statsError ?? statsData.error;
|
||||
return <Container error={finalError} />;
|
||||
if (statsError) {
|
||||
return <Container error={statsError} />;
|
||||
}
|
||||
|
||||
if (!statsData) {
|
||||
|
||||
Reference in New Issue
Block a user