diff --git a/gulp/res/js/forms.js b/gulp/res/js/forms.js index df7c0fe2..6820bfaf 100644 --- a/gulp/res/js/forms.js +++ b/gulp/res/js/forms.js @@ -146,7 +146,7 @@ class postFormHandler { } updateFlagField() { - if (this.customFlagInput) { + if (this.customFlagInput && this.customFlagInput.options.selectedIndex !== -1) { this.selectedFlagImage.src = this.customFlagInput.options[this.customFlagInput.options.selectedIndex].dataset.src || ''; } }