From b9900bf4664584794bd88be279e72bdec7ad318a Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Thu, 24 Mar 2022 23:36:32 +1100 Subject: [PATCH] minor bugfix, no selectedindex causes error with customflag --- gulp/res/js/forms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 || ''; } }