Skip to content

Commit

Permalink
optional method
Browse files Browse the repository at this point in the history
  • Loading branch information
octo-kumo authored Sep 5, 2022
1 parent b1674e4 commit bd462b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chapters/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function parseMapDrops(div: Element): MapDrop[] {
if (n.nodeType === 3) rewards.push(n.textContent.replace(",", "").trim());
} else {
let e = n as HTMLElement
buf += e?.firstElementChild?.getAttribute("alt") ?? e?.firstElementChild?.getAttribute("title") ?? e?.getAttribute("alt") ?? e?.getAttribute("title") ?? e?.textContent ?? ""
buf += e?.firstElementChild?.getAttribute?.("alt") ?? e?.firstElementChild?.getAttribute?.("title") ?? e?.getAttribute?.("alt") ?? e?.getAttribute?.("title") ?? e?.textContent ?? ""
while (m = buf.match(MAP_DROP_REGEX)) {
buf = buf.slice(m[0].length)
rewards.push({
Expand Down

0 comments on commit bd462b3

Please sign in to comment.