diff --git a/lib/index.js b/lib/index.js index 8169fd3..8c098d8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -36,9 +36,7 @@ module.exports = function (cardscript) { const collection = collections[type] - if (collection) { - dottie.get(element, collection).forEach(parseElement) - } else if (type === 'Input.ApiLookup') { + if (type === 'Input.ApiLookup') { if (element.parametersCard) element.parametersCard.body.forEach(parseElement) if (element.resultsCard) element.resultsCard.body.forEach(parseElement) } else if (type === 'Input.ChoiceSet') { @@ -61,6 +59,8 @@ module.exports = function (cardscript) { } } } + } else if (collection) { + dottie.get(element, collection).forEach(parseElement) } }