Previous commit was defective, credits_total would not have been calculated if a nil didn't exist in a valid credits array.
This commit is contained in:
parent
8800abf9bb
commit
c82156ef67
|
@ -239,7 +239,8 @@ module Spree::PaypalExpress
|
|||
end
|
||||
|
||||
credits_total = 0
|
||||
if credits.compact!
|
||||
credits.compact!
|
||||
if !credits.empty?
|
||||
items.concat credits
|
||||
credits_total = credits.map {|i| i[:amount] * i[:qty] }.sum
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue