fix: LoadItems() overwriting item cache avatar sandbox
This commit is contained in:
parent
3e5ae5b782
commit
ec9c7f8671
1 changed files with 24 additions and 22 deletions
|
|
@ -500,6 +500,7 @@ async function LoadItems() {
|
||||||
`
|
`
|
||||||
document.getElementById('inventory').appendChild(ItemColumn)
|
document.getElementById('inventory').appendChild(ItemColumn)
|
||||||
|
|
||||||
|
if (ItemCache[item.id] === undefined) {
|
||||||
ItemCache[item.id] = {
|
ItemCache[item.id] = {
|
||||||
type: item.type,
|
type: item.type,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
|
|
@ -524,6 +525,7 @@ async function LoadItems() {
|
||||||
if (item.type === 'hat') {
|
if (item.type === 'hat') {
|
||||||
ItemCache[item.id].accessoryType = item.accessoryType
|
ItemCache[item.id].accessoryType = item.accessoryType
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ItemColumn.getElementsByClassName('p-2')[0].addEventListener('click', function(){
|
ItemColumn.getElementsByClassName('p-2')[0].addEventListener('click', function(){
|
||||||
WearAsset(item)
|
WearAsset(item)
|
||||||
|
|
|
||||||
Reference in a new issue