Fix incorrect states clearing

This commit is contained in:
micialware committed 2026-09-21 11:53:07 +03:00
1 parent a5526dc5e9
commit 48cd68d1c7
1 file changed
+1 -1
+1 -1
View File
@@ -220,7 +220,7 @@ fn update_deck_stats(deck: &DeckSettings, state: &AppState) -> MaybeError {
.map(|w| w.id)
.collect::<Vec<_>>();
filtered_words.iter().for_each(|word_id| {
if let Some(index) = db_stats.iter().position(|stat_id| stat_id.id == *word_id) {
if let Some(index) = db_stats.iter().position(|stat_id| stat_id.word_id == *word_id) {
db_stats.remove(index);
}
});