Fix empty input in settings

This commit is contained in:
Corbin Davenport 2023-07-11 17:14:42 -04:00
parent 01416b3405
commit eebbfa3225
1 changed files with 3 additions and 1 deletions

View File

@ -36,8 +36,10 @@ document.querySelector('#server-add-btn').addEventListener('click', function ()
if (serverInput.startsWith('https://')) {
var serverObj = new URL(serverInput);
serverDomain = serverObj.hostname;
} else {
} else if (serverInput) {
serverDomain = serverInput;
} else {
return true;
}
// Add URL to list
var el = document.createElement('option')