Avoid adding empty entries to the donain list, when nothing is chosen.
Co-authored-by: Nikita Karamov <nick@karamoff.dev>
This commit is contained in:
parent
d4bf9e6456
commit
3cc3c96a3e
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ function instances_loaded() {
|
|||
|
||||
const chosen_instance = instance.value;
|
||||
const domains = servers.map(obj => obj.domain);
|
||||
if (domains.indexOf(chosen_instance) === -1) {
|
||||
if (chosen_instance && domains.indexOf(chosen_instance) === -1) {
|
||||
domains.push(chosen_instance);
|
||||
}
|
||||
domains.sort();
|
||||
|
|
Reference in a new issue