forked from rDrama/rDrama
1
0
Fork 0

fix negative award quantities

master
Aevann 2023-10-26 20:59:20 +03:00
parent fdb7eea8f6
commit 63f571b1ce
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ function pick(kind, price, coins, marseybux) {
const ownednum = Number(document.getElementById(`${kind}-owned`).textContent);
if (ownednum) {
if (ownednum > 0) {
document.getElementById('award_price').textContent = `${ownednum} owned`;
giveaward_button.classList.remove('d-none');
document.getElementById('buyandgiveaward').classList.add('d-none');
@ -182,7 +182,7 @@ function giveaward(t) {
owned.textContent = ownednum
let ownedblock = document.getElementById(`${kind}-owned-block`)
if (ownednum) {
if (ownednum > 0) {
ownedblock.innerHTML = `<span>${ownednum} owned</span>`;
document.getElementById('award_price').textContent = `${ownednum} owned`;
}