From 9da91576ac7c21d2fd0d6afac529f003fe7f9cb5 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 7 Jul 2020 13:46:03 +1000 Subject: [PATCH] Fix height of invisible "in cart" text While the text "x in cart" isn't visible, the item quantity is not set. A missing variable leads to longer text that is taken up more space. In this case it was two lines instead of one line. The resulting extra line of margin disappeared when adding to the cart and the rest of the page jumped up. --- .../templates/partials/shop_variant_no_group_buy.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/templates/partials/shop_variant_no_group_buy.html.haml b/app/assets/javascripts/templates/partials/shop_variant_no_group_buy.html.haml index d3ae5b9b46..12572930dd 100644 --- a/app/assets/javascripts/templates/partials/shop_variant_no_group_buy.html.haml +++ b/app/assets/javascripts/templates/partials/shop_variant_no_group_buy.html.haml @@ -8,7 +8,7 @@ {{ "js.shop_variant_no_group_buy.increment" | t }} %br .variant-quantity-display{ng: {class: "{visible: variant.line_item.quantity}"}} - {{ "js.shop_variant_no_group_buy.in_cart" | t:{quantity: variant.line_item.quantity} }} + {{ "js.shop_variant_no_group_buy.in_cart" | t:{quantity: variant.line_item.quantity || 0} }} %input{type: :hidden, name: "variants[{{::variant.id}}]", ng: {model: "variant.line_item.quantity"}}