Commit ebbed4db552ee378836c5608b438e98a5b0afc90

Authored by zhangqijia
1 parent 8dc5f0dd

fix: 获得邮件奖励的bug

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
src/actions/EmailAction.lua
@@ -94,7 +94,11 @@ local function getEmailAttachments( email ) @@ -94,7 +94,11 @@ local function getEmailAttachments( email )
94 local rewardPms = email:getProperty("rewardPms") 94 local rewardPms = email:getProperty("rewardPms")
95 local emailData = csvdb["emailCsv"][email:getProperty("emailId")] 95 local emailData = csvdb["emailCsv"][email:getProperty("emailId")]
96 if emailData then 96 if emailData then
97 - attachments = emailData.attachment:format(table.unpack(rewardPms)) 97 + if next(rewardPms) then
  98 + attachments = emailData.attachment:format(table.unpack(rewardPms))
  99 + else
  100 + attachments = emailData.attachment
  101 + end
98 end 102 end
99 end 103 end
100 return attachments 104 return attachments