mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
Update getActivityPage to accept bosses.
This commit is contained in:
@@ -41,7 +41,7 @@ export const numberFromElement = (el: CheerioElement) => {
|
||||
return parseInt(number, 10);
|
||||
};
|
||||
|
||||
export const rsnFromElement = (el: CheerioElement) => {
|
||||
const innerText = el.firstChild.data;
|
||||
export const rsnFromElement = (el: CheerioElement | undefined) => {
|
||||
const innerText = el?.firstChild.data;
|
||||
return innerText ? innerText.replace(/\uFFFD/g, ' ') : '';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user