From 1368261a6655df2bf62b99840455052e0c898df8 Mon Sep 17 00:00:00 2001 From: sajjad isvand Date: Fri, 14 Jun 2024 02:56:54 +0330 Subject: [PATCH] fixed: handle undefined defServer in AddDnsModalComponent --- src/renderer/component/modals/add-dns.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/component/modals/add-dns.component.tsx b/src/renderer/component/modals/add-dns.component.tsx index 241a497..50c0955 100644 --- a/src/renderer/component/modals/add-dns.component.tsx +++ b/src/renderer/component/modals/add-dns.component.tsx @@ -35,7 +35,7 @@ export function AddDnsModalComponent(props: Props) { useEffect(() => { if (!props.isOpen) return const defServer = window.storePreload.get('defaultServer') - if (defServer.servers) { + if (defServer && defServer.servers) { setDNSAddressToInput('def-serverInput-1', defServer.servers[0]) setDNSAddressToInput('def-serverInput-2', defServer.servers[1]) }