Update guard clause in line item callbacks (take two)

The `changed?` method is more accurately replaced by `saved_changes.present?`

In some cases here (where the object had just been saved for the first time) the guard clause was still stopping execution unexpectedly.
This commit is contained in:
Matt-Yorkley
2021-04-10 18:42:07 +01:00
parent ac53df37d9
commit 1de68d091a

View File

@@ -226,7 +226,7 @@ module Spree
end
def update_order
return unless saved_change_to_quantity? || destroyed?
return unless saved_changes.present? || destroyed?
# update the order totals, etc.
order.create_tax_charge!