mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-11 04:21:09 +00:00
Added fix for subtab crashes
This commit is contained in:
parent
7f1fbe058d
commit
69bd05b469
2 changed files with 10 additions and 0 deletions
js
|
@ -157,6 +157,15 @@ function fixSave() {
|
|||
{
|
||||
if (player[layer].best !== undefined) player[layer].best = new Decimal (player[layer].best)
|
||||
if (player[layer].total !== undefined) player[layer].total = new Decimal (player[layer].total)
|
||||
|
||||
if (layers[layer].tabFormat && !Array.isArray(layers[layer].tabFormat)) {
|
||||
|
||||
if(!Object.keys(layers[layer].tabFormat).includes(player.subtabs[layer].mainTabs)) player.subtabs[layer].mainTabs = Object.keys(layers[layer].tabFormat)[0]
|
||||
}
|
||||
if (layers[layer].microtabs) {
|
||||
for (item in layers[layer].microtabs)
|
||||
if(!Object.keys(layers[layer].microtabs[item]).includes(player.subtabs[layer][item])) player.subtabs[layer][item] = Object.keys(layers[layer].microtabs[item])[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue