Skip to content

Commit 7c1667e

Browse files
authored
Fix: Display Applied Sticker Slabs on Market Pages (#364)
* fix: applied sticker slabs in market * chore: run format
1 parent 204062e commit 7c1667e

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/lib/components/market/sticker_display.ts

Lines changed: 8 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,18 @@ 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 (
200+
description?.type !== 'html' ||
201+
(description.value.includes('sticker') && !description.value.includes('Sticker Slab'))
202+
) {
200203
this.keychains = [];
201204
return;
202205
}
203206

204207
this.keychains = this.parseAppliedItems(description, AppliedType.Charm, (index) => {
205-
return `#${this.itemInfo.keychains[index]?.pattern}`;
208+
// Sticker Slabs don't have a pattern
209+
const pattern = this.itemInfo.keychains[index]?.pattern;
210+
return pattern ? `#${pattern}` : '';
206211
});
207212
}
208213

0 commit comments

Comments
 (0)