diff --git a/src/controller/dockerController.ts b/src/controller/dockerController.ts index fd0aa663..8feb7786 100644 --- a/src/controller/dockerController.ts +++ b/src/controller/dockerController.ts @@ -106,7 +106,8 @@ class DockerController extends AbstractServiceController { } async fetchRegistries(): Promise { - return await api().get(`v1/registries/`); + const response = await api().get(`v1/registries/`); + return response.data; } async resetDefaultRegistry(): Promise { diff --git a/src/modules/settings/components/domain/Domains.tsx b/src/modules/settings/components/domain/Domains.tsx index 6dceb51f..dd8193cd 100644 --- a/src/modules/settings/components/domain/Domains.tsx +++ b/src/modules/settings/components/domain/Domains.tsx @@ -14,8 +14,8 @@ const Domains = () => { useEffect(() => { (async () => { - const dnsInfo = await apiDnsd().get("dns/existing"); - setDomains(dnsInfo.data.map((dnsInfo: { domain: any }) => dnsInfo.domain)); + const { data } = await apiDnsd().get("dns/existing"); + setDomains(data?.map((dnsInfo: { domain: any }) => dnsInfo.domain) ?? []); })(); }, []);