Fix the wrong notetype being selected by default

Regressed in #2082

https://forums.ankiweb.net/t/anki-2-1-55-beta-7/25130/7
This commit is contained in:
Damien Elmes 2022-12-05 15:08:00 +10:00
parent fad1ff7467
commit 8165f95cde

View File

@ -16,7 +16,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const notetypes = state.notetypes;
const info = state.info;
let value: number = 0;
let value = $notetypes.findIndex((e) => e.current);
$: options = Array.from($notetypes, (notetype) => notetype.name);
$: label = options[value];