Skip to content

Commit

Permalink
fix: souvenir sticker element
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums committed Oct 27, 2024
1 parent c65dc97 commit b60ae89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/contents/csfloat_script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ async function adjustSalesTableRow(container: Element) {
// add sticker percentage
const appStickerView = container.querySelector<HTMLElement>('app-sticker-view');
const stickerData = cachedSale.item.stickers;
if (appStickerView && stickerData && extensionSettings['csf-stickerprices']) {
if (appStickerView && stickerData && cachedSale.item?.quality !== 12 && extensionSettings['csf-stickerprices']) {
appStickerView.style.justifyContent = 'center';
if (stickerData.length > 0) {
const stickerContainer = document.createElement('div');
Expand Down Expand Up @@ -1309,7 +1309,7 @@ async function changeSpContainer(csfSP: Element, stickers: CSFloat.StickerData[]
stickers.map(async (s) => {
const buffPrice = await getItemPrice(s.name, source);
return {
csf: s.reference.price / 100,
csf: (s.reference?.price ?? 0) / 100,
buff: buffPrice.starting_at * currencyRate,
};
})
Expand Down
2 changes: 1 addition & 1 deletion src/lib/@typings/FloatTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export namespace CSFloat {
offset_y?: number;
offset_z?: number;
pattern?: number; // only for charms
reference: {
reference?: {
price: number;
quantity: number;
updated_at: string;
Expand Down

0 comments on commit b60ae89

Please sign in to comment.