Fix chapter 1 season 4 and 5 crash

This commit is contained in:
Lawin0129
2022-02-13 00:48:36 +00:00
committed by GitHub
parent d8614dfd04
commit fd7c8b657c

View File

@@ -24,17 +24,20 @@ axios.get("https://fortnite-api.com/v2/cosmetics/br").then(resp => {
})
}
athena.items[id] = {
"templateId": id,
"attributes": {
"max_level_bonus": 0,
"level": 1,
"item_seen": true,
"xp": 0,
"variants": variants,
"favorite": false
},
"quantity": 1
// Dont add anything that includes "random" in the id (Chapter 1 Season 4 and 5 crash fix)
if (!item.id.toLowerCase().includes("random")) {
athena.items[id] = {
"templateId": id,
"attributes": {
"max_level_bonus": 0,
"level": 1,
"item_seen": true,
"xp": 0,
"variants": variants,
"favorite": false
},
"quantity": 1
}
}
})
@@ -58,4 +61,4 @@ function size(bytes) {
}
return (bytes / Math.pow(1024, i)).toFixed(1) + " " + sizes[i]
}
}