Skip to content

Commit

Permalink
feat: allow fact set to point to array
Browse files Browse the repository at this point in the history
  • Loading branch information
meenahoda authored and Meena Hoda committed Oct 10, 2019
1 parent 662e63a commit 11dc13e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ module.exports = function (cardscript) {
element.items.forEach(parseElement)
break
case 'FactSet':
for (const fact of element.facts) {
if (fact.choices) {
buildTitleMap(fact.title, fact.choices, true)
if (Array.isArray(element.facts)) {
for (const fact of element.facts) {
if (fact.choices) {
buildTitleMap(fact.title, fact.choices, true)
}
}
}
break
Expand Down

0 comments on commit 11dc13e

Please sign in to comment.