Replace quantity value onBlur

This commit is contained in:
Andrew Miner
2015-11-16 17:43:06 -08:00
parent 2c163a683d
commit 9cbdfd47e9
@@ -66,8 +66,8 @@ module.exports = class StackController extends BaseController
newQuantity = Math.min newQuantity, StackController.MAX_QUANTITY newQuantity = Math.min newQuantity, StackController.MAX_QUANTITY
newQuantity = Math.max 1, newQuantity newQuantity = Math.max 1, newQuantity
@$quantityField.val "#{newQuantity}"
if newQuantity? and newQuantity isnt oldQuantity if newQuantity? and newQuantity isnt oldQuantity
@$quantityField.val "#{newQuantity}"
@$bubble.removeClass 'error', Duration.snap @$bubble.removeClass 'error', Duration.snap
@$bubble.removeClass 'error-new', Duration.snap @$bubble.removeClass 'error-new', Duration.snap