handles no metadata
This commit is contained in:
parent
c31850fd93
commit
ec3a00b6ff
@ -378,9 +378,8 @@ function doUpkeep(_, clickedByColor, isRightClick)
|
||||
local cardsToDiscard = {}
|
||||
|
||||
for i = 1, #handCards do
|
||||
local metadata = JSON.decode(handCards[i].getGMNotes()) or {}
|
||||
if metadata.weakness == true or metadata.hidden == true then
|
||||
else
|
||||
local metadata = JSON.decode(handCards[i].getGMNotes())
|
||||
if metadata ~= nil and (not metadata.weakness and not metadata.hidden) then
|
||||
table.insert(cardsToDiscard, handCards[i])
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user