mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
Simplify error catching
This commit is contained in:
parent
00163d2f44
commit
8a783ba9f6
41 changed files with 93 additions and 113 deletions
|
@ -11,9 +11,8 @@ export default function Component({ service }) {
|
|||
|
||||
const { data, error } = useWidgetAPI(widget, "info");
|
||||
|
||||
if (error || data?.error) {
|
||||
const finalError = error ?? data.error;
|
||||
return <Container error={finalError} />;
|
||||
if (error) {
|
||||
return <Container error={error} />;
|
||||
}
|
||||
const totalObserved = Object.keys(data).length;
|
||||
let diffsDetected = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue