Skip to content

Commit

Permalink
rima.lua: no return tasks without data
Browse files Browse the repository at this point in the history
  • Loading branch information
o2gy84 committed Jan 19, 2017
1 parent 1694069 commit 258c1f2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rima.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,15 @@ function rima_get_ex(prio, source)

local key = get_prio_key_with_lock(prio, source)
if key == nil then return end
return unpack(get_key_data(key))

local tasks = get_key_data(key)
if table.getn(tasks) == 1 then
-- if only email in table, it means there are no tasks
rima_done(key)
return
end

return unpack(tasks)
end

--
Expand Down

0 comments on commit 258c1f2

Please sign in to comment.