fix: fix errors wearing toolbox assets in avatar sandbox

This commit is contained in:
Index 2024-07-03 00:49:11 -05:00
parent 3b0f079a2f
commit 8e8cf7981a

View file

@ -292,6 +292,11 @@ async function UpdateAvatar() {
const MeshURL = (await (await fetch('https://api.polytoria.com/v1/assets/serve-mesh/' + x)).json()) const MeshURL = (await (await fetch('https://api.polytoria.com/v1/assets/serve-mesh/' + x)).json())
if (MeshURL.success) { if (MeshURL.success) {
ItemCache[x].asset = MeshURL.url ItemCache[x].asset = MeshURL.url
if (["mesh", "decal", "audio"].indexOf(ItemCache[x].type) !== -1) {
ItemCache[x].type = document.getElementById('load-asset-type').options[document.getElementById('load-asset-type').selectedIndex].value
}
if (ItemCache[x].type === 'hat') { if (ItemCache[x].type === 'hat') {
FormattedAvatar.items[index] = MeshURL.url FormattedAvatar.items[index] = MeshURL.url
} else { } else {