Non-touch: fix crash when expanding ToC (#8892)

This commit is contained in:
Philip Chan authored and GitHub committed 2022-03-12 15:51:22 +01:00
1 parent 4f849c23ab
commit 36fc981b7c
1 file changed
+1 -1
+1 -1
View File
@@ -815,7 +815,7 @@ function ReaderToc:onShowToc()
function toc_menu:onMenuHold(item)
if not Device:isTouchDevice() and (item.state and item.state.callback) then
-- non touch to expand toc
item.state.callback()
item.state.callback(item.index)
else
-- Match the items' width
local infomessage = InfoMessage:new{