fix bug where orders with line_item_adjustments would fail
deal with undefined error when running tests. ref: https://github.com/spree/spree/issues/4442