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) ->
|
onClickProductButton: (e) ->
|
||||||
@playSound 'menu-button-click'
|
@playSound 'menu-button-click'
|
||||||
productID = $(e.target).closest('button').val()
|
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 }
|
product = @products.findWhere { name: productID }
|
||||||
|
|
||||||
if application.isIPadApp
|
if application.isIPadApp
|
||||||
|
|
Reference in a new issue