From e9051353a20e5017ed9dddd914ab9a242b45b6a1 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Sat, 14 Oct 2023 18:56:14 +0300 Subject: [PATCH] Vocabbuilder: fix docless title (#11008) Closes #11006. --- plugins/vocabbuilder.koplugin/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vocabbuilder.koplugin/main.lua b/plugins/vocabbuilder.koplugin/main.lua index b9e6be9bf..0bf21c7c0 100644 --- a/plugins/vocabbuilder.koplugin/main.lua +++ b/plugins/vocabbuilder.koplugin/main.lua @@ -77,7 +77,7 @@ local function resetButtonOnLookupWindow() text = _("Add to vocabulary builder"), font_bold = false, callback = function() - local book_title = obj.ui.doc_props.display_title or _("Dictionary lookup") + local book_title = (obj.ui.doc_props and obj.ui.doc_props.display_title) or _("Dictionary lookup") obj.ui:handleEvent(Event:new("WordLookedUp", obj.word, book_title, true)) -- is_manual: true local button = obj.button_table.button_by_id["vocabulary"] if button then