Skip to content

Commit

Permalink
fix: dndappfile trait duplication (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Dec 16, 2021
1 parent 86d12b1 commit 6c85d31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/importers/DnDAppFilesImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ function getTraits(
if (name[0].textContent.includes("Spellcasting")) continue;
const text = [];
const traitTexts = trait.getElementsByTagName("text");
for (let index in traitTexts) {
/* if (!traitTexts[index]) break; */
text.push(traitTexts[index].textContent);

for (let texts of Array.from(traitTexts)) {
text.push(texts.textContent);
}
traitList.push({
name: name[0].textContent,
Expand Down

0 comments on commit 6c85d31

Please sign in to comment.