error handling

This commit is contained in:
Chr1Z93 2024-08-08 21:39:25 +02:00
parent 56e1746f54
commit 0c4e33fd0c

View File

@ -241,8 +241,8 @@ function buildSupplementalIndexes()
writeToNestedTable(customInvestigatorData, "InvestigatorSubdata", cardId, "cards", cardId)
-- read the signatures
if card.metadata.signatures then
for sigId, sigCount in pairs(card.metadata.signatures[1]) do
if card.metadata.signatures and type(card.metadata.signatures) == "table" then
for sigId, sigCount in pairs(card.metadata.signatures[1] or {}) do
customSignatureDict[sigId] = true
for i = 1, sigCount do
writeToNestedTable(customInvestigatorData, "InvestigatorSubdata", cardId, "signatures", sigId)