feat: polish release v2 experience (#6800)
This commit is contained in:
1 parent
925b0fb801
commit
a4a903d7c3
295 files changed
+10627
-7115
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { isRecord } from "@homarr/common";
|
||||
import { ResponseError } from "@homarr/common/server";
|
||||
import { fetchWithTrustedCertificatesAsync } from "@homarr/core/infrastructure/http";
|
||||
import { createLogger } from "@homarr/core/infrastructure/logs";
|
||||
@@ -39,8 +40,8 @@ const pad = (number: number) => String(number).padStart(2, "0");
|
||||
|
||||
const extractDataArray = (json: unknown): unknown[] => {
|
||||
if (Array.isArray(json)) return json;
|
||||
if (json && typeof json === "object" && "data" in json && Array.isArray((json as { data: unknown }).data)) {
|
||||
return (json as { data: unknown[] }).data;
|
||||
if (isRecord(json) && Array.isArray(json.data)) {
|
||||
return json.data;
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user