From b9b7c482d4ef252472e9a5db58526a8adaf15bff Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 4 Aug 2024 21:30:21 -0700 Subject: [PATCH] Fix immich version check --- src/widgets/immich/component.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/immich/component.jsx b/src/widgets/immich/component.jsx index 66616f784..5f5bbedde 100644 --- a/src/widgets/immich/component.jsx +++ b/src/widgets/immich/component.jsx @@ -10,7 +10,8 @@ export default function Component({ service }) { const { data: versionData, error: versionError } = useWidgetAPI(widget, "version"); // see https://github.com/gethomepage/homepage/issues/2282 - const endpoint = versionData?.major >= 1 && versionData?.minor > 84 ? "statistics" : "stats"; + const endpoint = + versionData?.major > 1 || (versionData?.major === 1 && versionData?.minor > 84) ? "statistics" : "stats"; const { data: immichData, error: immichError } = useWidgetAPI(widget, endpoint); if (immichError || versionError || immichData?.statusCode === 401) {