diff --git a/src/features/buyable.tsx b/src/features/buyable.tsx index 7f94ad4..1adcce5 100644 --- a/src/features/buyable.tsx +++ b/src/features/buyable.tsx @@ -161,7 +161,7 @@ export function createBuyable( ); genericBuyable.amount.value = Decimal.add(genericBuyable.amount.value, 1); } - this.onPurchase?.(cost); + genericBuyable.onPurchase?.(cost); }; processComputable(buyable as T, "display"); const display = buyable.display;