fix: fix avatar sandbox load user overwriting cache
This commit is contained in:
parent
431ef7ee73
commit
3b0f079a2f
1 changed files with 15 additions and 13 deletions
|
|
@ -384,19 +384,21 @@ async function LoadUser(id) {
|
||||||
Avatar.items = [];
|
Avatar.items = [];
|
||||||
|
|
||||||
data.assets.forEach((item) => {
|
data.assets.forEach((item) => {
|
||||||
ItemCache[item.id] = {
|
if (ItemCache[item.id] === undefined) {
|
||||||
type: item.type,
|
ItemCache[item.id] = {
|
||||||
name: item.name,
|
type: item.type,
|
||||||
price: null,
|
name: item.name,
|
||||||
creator: null,
|
price: null,
|
||||||
thumbnail: item.thumbnail,
|
creator: null,
|
||||||
asset: item.path
|
thumbnail: item.thumbnail,
|
||||||
}
|
asset: item.path
|
||||||
|
}
|
||||||
if (item.type === 'hat' || item.type === 'tool') {
|
|
||||||
ItemCache[item.id].creator = {
|
if (item.type === 'hat' || item.type === 'tool' || item.type === 'torso') {
|
||||||
id: 1,
|
ItemCache[item.id].creator = {
|
||||||
name: "Polytoria"
|
id: 1,
|
||||||
|
name: "Polytoria"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue