From 3cc3c96a3ef3ab34e7f5b140ae251e630f24d3ac Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Thu, 24 Sep 2020 10:59:25 +0100 Subject: [PATCH] Avoid adding empty entries to the donain list, when nothing is chosen. Co-authored-by: Nikita Karamov --- src/script/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/index.js b/src/script/index.js index f042627..a2c3993 100644 --- a/src/script/index.js +++ b/src/script/index.js @@ -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();