Skip to content

Commit

Permalink
Fix empty input in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
corbindavenport committed Jul 11, 2023
1 parent 01416b3 commit eebbfa3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit eebbfa3

Please sign in to comment.