Fix EasyDays not applying defaults correctly in deck options (#3691)

* fix EasyDays not applying defaults correctly

* remove the svelte-ignore that's no longer needed
This commit is contained in:
llama 2025-01-09 18:32:16 +08:00 committed by GitHub
parent 16514727ff
commit 9499473caa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,9 +16,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
const config = state.currentConfig; const config = state.currentConfig;
const defaults = state.defaults; const defaults = state.defaults;
// svelte-ignore reactive_declaration_non_reactive_property
$: if ($config.easyDaysPercentages.length !== 7) { $: if ($config.easyDaysPercentages.length !== 7) {
$config.easyDaysPercentages = defaults.easyDaysPercentages; $config.easyDaysPercentages = defaults.easyDaysPercentages.slice();
} }
$: noNormalDay = $config.easyDaysPercentages.some((p) => p === 1.0) $: noNormalDay = $config.easyDaysPercentages.some((p) => p === 1.0)