KoptInterface:getWordFromBoxes: guard against nil boxes (#6827)
Fixes #6825
This commit is contained in:
1 parent
144fd78986
commit
40b4ccffa8
1 file changed
+1
-1
@@ -799,7 +799,7 @@ end
|
||||
Get word and word box around `pos`.
|
||||
--]]
|
||||
function KoptInterface:getWordFromBoxes(boxes, pos)
|
||||
if not pos or #boxes == 0 then return {} end
|
||||
if not pos or not boxes or #boxes == 0 then return {} end
|
||||
local i, j = getWordBoxIndices(boxes, pos)
|
||||
local lb = boxes[i]
|
||||
local wb = boxes[i][j]
|
||||
|
||||
Reference in new issue
Block a user