From ee6197efff3050002df6836914d453900d9e42df Mon Sep 17 00:00:00 2001 From: weijiuqiao <59040746+weijiuqiao@users.noreply.github.com> Date: Fri, 3 Jun 2022 15:52:39 +0800 Subject: [PATCH] [fix, plugin] Vocabulary builder: prevent resetting changes when reviewing backwards (#9161) --- plugins/vocabbuilder.koplugin/db.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vocabbuilder.koplugin/db.lua b/plugins/vocabbuilder.koplugin/db.lua index 8e3f6b48f..25f193560 100644 --- a/plugins/vocabbuilder.koplugin/db.lua +++ b/plugins/vocabbuilder.koplugin/db.lua @@ -110,7 +110,7 @@ function VocabularyBuilder:_select_items(items, start_idx) for i = 1, #results.word do local item = items[start_idx+i-1] - if item then + if item and not item.word then item.word = results.word[i] item.review_count = math.max(0, math.min(8, tonumber(results.review_count[i]))) item.book_title = results.book_title[i] or ""