Fix incorrect states clearing
This commit is contained in:
1 parent
a5526dc5e9
commit
48cd68d1c7
1 file changed
+1
-1
@@ -220,7 +220,7 @@ fn update_deck_stats(deck: &DeckSettings, state: &AppState) -> MaybeError {
|
|||||||
.map(|w| w.id)
|
.map(|w| w.id)
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
filtered_words.iter().for_each(|word_id| {
|
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);
|
db_stats.remove(index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user