Hypixel-API-Reborn / hypixel-api-reborn

Feature-rich Hypixel API wrapper for Node.js
https://hypixel-api-reborn.github.io
MIT License
98 stars 27 forks source link

Return error for some player #483

Closed qentin1741 closed 8 months ago

qentin1741 commented 9 months ago

Bug report

Get error reading 'catacombs' for some uuid or player nickname but not for all

Ghosty920 commented 8 months ago
if (!objectPath.has(data, 'dungeons')) {
    return null;
}

Your profile data probably has like mine :

"data": {
    "dungeons": {
        "dungeons_blah_blah": [
            "ophelia_first_talk"
        ]
    }
}

And when it calls data.dungeons.dungeon_types.catacombs, there's an exception because dungeon_types doesn't exist

Kathund commented 8 months ago

Fixed in #484