Commit: 05442a983b2e6ac08dae80a4ddc6cb52f7dbb9bb
Parent: 606adebac61f594a29e783a6bab2eae45d2165a2
Author: Ren Tatsumoto
Date: Sun, 11 Oct 2020 03:55:43 +0300
prevent crash if anki collection is empty
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -520,7 +520,7 @@ ankiconnect.get_last_note_id = function()
local ret = ankiconnect.execute(args)
local note_ids, _ = ankiconnect.parse_result(ret)
- if note_ids ~= nil then
+ if not is_emptytable(note_ids) then
local last_note_id = math.max(table.unpack(note_ids))
return last_note_id
else