Skip to content

Commit

Permalink
fixed: handle undefined defServer in AddDnsModalComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
sajjadmrx committed Jun 13, 2024
1 parent 522a4ac commit 1368261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/component/modals/add-dns.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
Expand Down

0 comments on commit 1368261

Please sign in to comment.