fix: fix creator name and uIDs always being Polytoria in avatar sandbox
This commit is contained in:
parent
aed860159b
commit
099b1c2b21
1 changed files with 3 additions and 3 deletions
|
|
@ -471,7 +471,7 @@ async function LoadItems() {
|
||||||
<h6 class="text-truncate mb-0">${item.name}</h6>
|
<h6 class="text-truncate mb-0">${item.name}</h6>
|
||||||
</a>
|
</a>
|
||||||
<small class="text-muted d-block text-truncate">
|
<small class="text-muted d-block text-truncate">
|
||||||
by <a href="/users/${ (item.type !== 'hat' && item.type !== 'tool') ? '1' : item.creator.id }" class="text-reset">${ (item.type !== 'hat' && item.type !== 'tool') ? 'Polytoria' : item.creator.name }</a>
|
by <a href="/users/${ (["hat", "tool", "face", "torso"].indexOf(item.type) !== -1) ? '1' : item.creator.id }" class="text-reset">${ (["hat", "tool", "face", "torso"].indexOf(item.type) !== -1) ? 'Polytoria' : item.creator.name }</a>
|
||||||
</small>
|
</small>
|
||||||
<small style="font-size: 0.8rem;" class="d-block text-truncate mb-2
|
<small style="font-size: 0.8rem;" class="d-block text-truncate mb-2
|
||||||
${ (item.price === 0) ? 'text-primary fw-bold">Free' : (item.price !== "???") ? 'text-success"><i class="pi mr-1">$</i> ' + item.price : 'text-muted">???</small>' }
|
${ (item.price === 0) ? 'text-primary fw-bold">Free' : (item.price !== "???") ? 'text-success"><i class="pi mr-1">$</i> ' + item.price : 'text-muted">???</small>' }
|
||||||
|
|
@ -516,14 +516,14 @@ function LoadWearing() {
|
||||||
[...Avatar.items, Avatar.shirt, Avatar.pants, Avatar.torso].filter((x) => x !== undefined).forEach(id => {
|
[...Avatar.items, Avatar.shirt, Avatar.pants, Avatar.torso].filter((x) => x !== undefined).forEach(id => {
|
||||||
const Cached = Object.values(ItemCache)[Object.keys(ItemCache).indexOf(id.toString())]
|
const Cached = Object.values(ItemCache)[Object.keys(ItemCache).indexOf(id.toString())]
|
||||||
if (Cached !== undefined) {
|
if (Cached !== undefined) {
|
||||||
if (Cached.creator === null) {
|
if (Cached.creator === undefined || Cached.creator === null) {
|
||||||
Cached.creator = {
|
Cached.creator = {
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "-"
|
name: "-"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Cached.price === null) { Cached.price = "???" }
|
if (Cached.price === undefined || Cached.price === null) { Cached.price = "???" }
|
||||||
|
|
||||||
const ItemColumn = document.createElement('div')
|
const ItemColumn = document.createElement('div')
|
||||||
ItemColumn.classList = 'col-auto'
|
ItemColumn.classList = 'col-auto'
|
||||||
|
|
|
||||||
Reference in a new issue