From 8800abf9bbe902e1e6c8ea951a33c4b2ba426c30 Mon Sep 17 00:00:00 2001 From: reaper Date: Thu, 6 Jan 2011 23:54:06 +0900 Subject: [PATCH] Third time's the charm right :-) Pesky compact! nil bug. --- lib/spree/paypal_express.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spree/paypal_express.rb b/lib/spree/paypal_express.rb index e4da911..57dc227 100644 --- a/lib/spree/paypal_express.rb +++ b/lib/spree/paypal_express.rb @@ -239,8 +239,8 @@ module Spree::PaypalExpress end credits_total = 0 - if credits.respond_to? :compact - items.concat credits.compact! + if credits.compact! + items.concat credits credits_total = credits.map {|i| i[:amount] * i[:qty] }.sum end