Skip to content

Commit ac871ca

Browse files
committed
fix: applied sticker slabs in market
1 parent 204062e commit ac871ca

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/lib/components/market/sticker_display.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export class StickerDisplay extends FloatElement {
109109
<a target="_blank" href="${item.url}">
110110
<img src="${item.imageUrl}" alt="${stickerName}" />
111111
</a>
112-
<span class="item-value">${item.value}</span>
112+
${item.value ? html`<span class="item-value">${item.value}</span>` : nothing}
113113
</div>
114114
`;
115115
}
@@ -196,13 +196,15 @@ export class StickerDisplay extends FloatElement {
196196
private loadKeychains(): void {
197197
const description = this.keychainDescription;
198198

199-
if (description?.type !== 'html' || description.value.includes('sticker')) {
199+
if (description?.type !== 'html' || (description.value.includes('sticker') && !description.value.includes('Sticker Slab'))) {
200200
this.keychains = [];
201201
return;
202202
}
203203

204204
this.keychains = this.parseAppliedItems(description, AppliedType.Charm, (index) => {
205-
return `#${this.itemInfo.keychains[index]?.pattern}`;
205+
// Sticker Slabs don't have a pattern
206+
const pattern = this.itemInfo.keychains[index]?.pattern;
207+
return pattern ? `#${pattern}` : '';
206208
});
207209
}
208210

0 commit comments

Comments
 (0)