Fix empty input in settings
This commit is contained in:
parent
01416b3405
commit
eebbfa3225
|
@ -36,8 +36,10 @@ document.querySelector('#server-add-btn').addEventListener('click', function ()
|
||||||
if (serverInput.startsWith('https://')) {
|
if (serverInput.startsWith('https://')) {
|
||||||
var serverObj = new URL(serverInput);
|
var serverObj = new URL(serverInput);
|
||||||
serverDomain = serverObj.hostname;
|
serverDomain = serverObj.hostname;
|
||||||
} else {
|
} else if (serverInput) {
|
||||||
serverDomain = serverInput;
|
serverDomain = serverInput;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
// Add URL to list
|
// Add URL to list
|
||||||
var el = document.createElement('option')
|
var el = document.createElement('option')
|
||||||
|
|
Loading…
Reference in New Issue