Skip to content

Commit bd462b3

Browse files
authored
optional method
1 parent b1674e4 commit bd462b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chapters/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function parseMapDrops(div: Element): MapDrop[] {
275275
if (n.nodeType === 3) rewards.push(n.textContent.replace(",", "").trim());
276276
} else {
277277
let e = n as HTMLElement
278-
buf += e?.firstElementChild?.getAttribute("alt") ?? e?.firstElementChild?.getAttribute("title") ?? e?.getAttribute("alt") ?? e?.getAttribute("title") ?? e?.textContent ?? ""
278+
buf += e?.firstElementChild?.getAttribute?.("alt") ?? e?.firstElementChild?.getAttribute?.("title") ?? e?.getAttribute?.("alt") ?? e?.getAttribute?.("title") ?? e?.textContent ?? ""
279279
while (m = buf.match(MAP_DROP_REGEX)) {
280280
buf = buf.slice(m[0].length)
281281
rewards.push({

0 commit comments

Comments
 (0)