Fix deck options selector not updating the current entry sometimes (#2387)

This commit is contained in:
Fabricio Duarte 2023-02-20 09:02:46 -03:00 committed by GitHub
parent 24216a07f0
commit ec15f1176c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
const dispatchPresetChange = () => dispatch("presetchange"); const dispatchPresetChange = () => dispatch("presetchange");
let value = $configList.findIndex((entry) => entry.current); $: value = $configList.findIndex((entry) => entry.current);
$: label = configLabel($configList[value]); $: label = configLabel($configList[value]);
function configLabel(entry: ConfigListEntry): string { function configLabel(entry: ConfigListEntry): string {