Fix issues

This commit is contained in:
schmelczerandras 2020-11-09 10:33:20 +01:00
parent 7cf33b9f1a
commit a4bab29d84
7 changed files with 30 additions and 14 deletions

View file

@ -82,15 +82,17 @@ export class JoinFormHandler {
if (response?.ok) {
const content: ServerInformation = await response.json();
const server = new ServerChooserOption(
content,
url,
this.removeServer.bind(this),
this.servers.length === 0,
);
this.servers.push(server);
this.joinButton.disabled = false;
this.container.appendChild(server.element);
if (!this.servers.find((s) => s.url === url)) {
const server = new ServerChooserOption(
content,
url,
this.removeServer.bind(this),
this.servers.length === 0,
);
this.servers.push(server);
this.joinButton.disabled = false;
this.container.appendChild(server.element);
}
}
});
}