diff --git a/js/settings.js b/js/settings.js index 6f80e90..06ffae1 100644 --- a/js/settings.js +++ b/js/settings.js @@ -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')