diff --git a/app/javascript/packages/phone-input/index.js b/app/javascript/packages/phone-input/index.js index e8e11be8764..bec088c0691 100644 --- a/app/javascript/packages/phone-input/index.js +++ b/app/javascript/packages/phone-input/index.js @@ -72,7 +72,7 @@ export class PhoneInput extends HTMLElement { get selectedOption() { const { codeInput } = this; - return codeInput && codeInput.selectedOptions[0]; + return codeInput && codeInput.options[codeInput.selectedIndex]; } /** diff --git a/app/javascript/packs/otp-delivery-preference.js b/app/javascript/packs/otp-delivery-preference.js index dc289aa3a3d..afb3ab5f1c3 100644 --- a/app/javascript/packs/otp-delivery-preference.js +++ b/app/javascript/packs/otp-delivery-preference.js @@ -82,7 +82,7 @@ function updateOTPDeliveryMethods(event) { return; } - const selectedOption = select.selectedOptions[0]; + const selectedOption = select.options[select.selectedIndex]; const methods = getOTPDeliveryMethods(); setHintText();