mirror of
https://github.com/gethomepage/homepage.git
synced 2026-05-12 18:48:27 -04:00
Fix: prevent Seerr widget incorrectly injecting "available" field (#6663)
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
parent
6053ddbab6
commit
f8e2e8d410
@ -30,10 +30,12 @@ export default function Component({ service }) {
|
||||
);
|
||||
}
|
||||
|
||||
if (statsData.completed === undefined) {
|
||||
// Newer versions added "completed", fallback to available
|
||||
widget.fields = widget.fields.filter((field) => field !== "completed");
|
||||
widget.fields.push("available");
|
||||
if (
|
||||
statsData.completed === undefined &&
|
||||
(widget.fields.includes("completed") || widget.fields.includes("available"))
|
||||
) {
|
||||
// Fallback to "available" if "completed" requested but not available
|
||||
widget.fields = widget.fields.map((field) => (field === "completed" ? "available" : field));
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user