Fix incorrect search being used when evaluating parameters

https://forums.ankiweb.net/t/anki-23-12-beta/37771/89
This commit is contained in:
Damien Elmes 2023-12-11 13:09:48 +10:00
parent c56efb4442
commit 4f10a2818f

View file

@ -133,8 +133,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
try { try {
await runWithBackendProgress( await runWithBackendProgress(
async () => { async () => {
const search = const search = $config.weightSearch
$config.weightSearch ?? `preset:"${state.getCurrentName()}"`; ? $config.weightSearch
: defaultWeightSearch;
const resp = await evaluateWeights({ const resp = await evaluateWeights({
weights: $config.fsrsWeights, weights: $config.fsrsWeights,
search, search,