Merge pull request #18209 from liviuconcioiu/18160

Fix #18160 - Check if hostname exists
This commit is contained in:
Maurício Meneghini Fauth 2023-03-04 20:21:05 -03:00 committed by GitHub
commit 1d267483ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@
* @return {bool} whether the form is validated or not
*/
function checkAddUser (theForm) {
if (theForm.elements.hostname.value === '') {
if (theForm.elements.hostname && theForm.elements.hostname.value === '') {
alert(Messages.strHostEmpty);
theForm.elements.hostname.focus();
return false;