From 414e1eb299e3993f00bc5f0023927d0b0a28a562 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sun, 5 Dec 2021 22:59:20 +0000 Subject: [PATCH] Tidy up OrdersController#load_order --- app/controllers/checkout_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index b2d45ddfac..70200fffa8 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -60,9 +60,7 @@ class CheckoutController < ::BaseController @order = current_order return order_invalid! if order_invalid_for_checkout? - - handle_invalid_stock && return unless valid_order_line_items? - + return handle_invalid_stock unless valid_order_line_items? return if valid_payment_intent_provided? before_address