Skip to content

Commit

Permalink
fix(orders): the order collection does not crash anymore if no custom…
Browse files Browse the repository at this point in the history
…er is present
  • Loading branch information
SteveBunlon committed Sep 18, 2020
1 parent f5615b9 commit 60ea8f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/forest_liana/collections/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class Forest::Order
collection :Order

belongs_to :delivery_address, reference: 'Address.id' do
object.customer.address
object.customer ? object.customer.address : nil
end
end

0 comments on commit 60ea8f3

Please sign in to comment.