bugfix (oopsie)
This commit is contained in:
@@ -6,9 +6,11 @@ async function champions(client: MongoClient, patch: string) {
|
||||
const collection = database.collection(patch);
|
||||
const data : Array<ChampionData> = (await collection.find().toArray()) as unknown as Array<ChampionData>
|
||||
data.map((x) => {
|
||||
for(let lane of x.lanes) {
|
||||
delete lane.builds
|
||||
delete lane.runes
|
||||
if(x.lanes != undefined && x.lanes != null) {
|
||||
for(let lane of x.lanes) {
|
||||
delete lane.builds
|
||||
delete lane.runes
|
||||
}
|
||||
}
|
||||
})
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user