mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
fix empty product bug
This commit is contained in:
parent
edaa04f7c9
commit
532dbda651
1 changed files with 3 additions and 0 deletions
|
@ -68,6 +68,9 @@ module.exports = class BuyGemsModal extends ModalView
|
|||
onClickProductButton: (e) ->
|
||||
@playSound 'menu-button-click'
|
||||
productID = $(e.target).closest('button').val()
|
||||
# Don't throw error when product is not found
|
||||
if productID.length == 0
|
||||
return
|
||||
product = @products.findWhere { name: productID }
|
||||
|
||||
if application.isIPadApp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue