Shopify Scripts Editor

Highlighted
Tourist
7 0 1

No clue about rails but i made this far, and my code works.

undefined method 'map' for nil line 1

Not sure how to defeat this error

 

 

customer = Input.cart.shipping_address.address1


if customer.include? 'PO'
  
  Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
    shipping_rate.name.upcase.start_with?("UPS")
  end

  Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
    shipping_rate.name.start_with?("FedEx")
  end

else
end

 

 

 

0 Likes
Highlighted
Tourist
7 0 1

ugh

0 Likes