Skip to content

Commit c3ba026

Browse files
authored
Init domains array for custom nameserver group (#304)
1 parent 193f8a7 commit c3ba026

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/components/NameServerGroupAdd.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const NameServerGroupAdd = () => {
126126
};
127127

128128
const onChange = (changedValues: any) => {
129+
129130
if (changedValues.primary !== undefined) {
130131
setIsPrimary(changedValues.primary);
131132
}
@@ -207,6 +208,7 @@ const NameServerGroupAdd = () => {
207208
let nsGroupLocal = {} as NameServerGroup;
208209
if (value === customChoice) {
209210
nsGroupLocal = nsGroup;
211+
nsGroupLocal.domains = [];
210212
} else {
211213
defaultDNSOptions.forEach((nsg) => {
212214
if (value === nsg.name) {

src/utils/routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const transformGroupedDataTable = (
9696
}
9797
});
9898
groupList = groupList.filter(
99-
(value, index, arrary) => arrary.indexOf(value) === index
99+
(value, index, array) => array.indexOf(value) === index
100100
);
101101
let groupDataTableRoutes = transformDataTable(listedRoutes, peers);
102102
const filterEnabledRoutes = groupDataTableRoutes.filter(

0 commit comments

Comments
 (0)