diff --git a/src/models/Email.lua b/src/models/Email.lua index 95ab75c..20b3d3a 100644 --- a/src/models/Email.lua +++ b/src/models/Email.lua @@ -62,7 +62,11 @@ function Email:data() end if attachments == "" and emailData.attachment ~= "" then - attachments = emailData.attachment:format(table.unpack(rewardPms)) + if next(rewardPms) then + attachments = emailData.attachment:format(table.unpack(rewardPms)) + else + attachments = emailData.attachment + end end end -- libgit2 0.21.2