Skip to content

Commit c4cd375

Browse files
authored
updated patch with proper fix
Given the issue derives from the `option`s returning the value as a string by default, the 'number' modifier typecasts the value as a number. This then correctly flows on to the script execution https://v2.vuejs.org/v2/guide/forms.html
1 parent 41acb99 commit c4cd375

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Popup/AddAccountPage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<option :value="OTPAlgorithm.GOST3411_2012_256">GOST 34.11 256</option>
3434
<option :value="OTPAlgorithm.GOST3411_2012_512">GOST 34.11 512</option>
3535
</a-select-input>
36-
<a-select-input :label="i18n.type" v-model="newAccount.type">
36+
<a-select-input :label="i18n.type" v-model.number="newAccount.type">
3737
<option :value="OTPType.totp">{{ i18n.based_on_time }}</option>
3838
<option :value="OTPType.hotp">{{ i18n.based_on_counter }}</option>
3939
<option :value="OTPType.battle">Battle.net</option>
@@ -103,7 +103,7 @@ export default Vue.extend({
103103
) {
104104
type = OTPType.hhex;
105105
} else {
106-
type = parseInt(this.newAccount.type);
106+
type = this.newAccount.type;
107107
}
108108
109109
if (type === OTPType.hhex || type === OTPType.hotp) {

0 commit comments

Comments
 (0)