Fix: Change sorting method for BSet cards to prioritize percent and then number of decks
This commit is contained in:
parent
46a038973a
commit
82928ea6df
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ async function createJson() {
|
|||
for (const index of Object.keys(bset_cards_data_export)) {
|
||||
let JSONToWrite = bset_cards_data_export[index]
|
||||
for (const type of Object.keys(JSONToWrite)) {
|
||||
JSONToWrite[type] = JSONToWrite[type].sort((a,b) => b.nbr_decks - a.nbr_decks || b.percent_decks - a.percent_decks)
|
||||
JSONToWrite[type] = JSONToWrite[type].sort((a,b) => b.percent_decks - a.percent_decks || b.nbr_decks - a.nbr_decks)
|
||||
}
|
||||
writeFileSync(import.meta.dirname + "/../data/bset/" + index + ".json",JSON.stringify(JSONToWrite), 'utf8')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue