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