From 7aea560dc19df547ed4f26aef6fc96001c7f129a Mon Sep 17 00:00:00 2001 From: "Bruce.carrot93" Date: Wed, 28 Aug 2019 08:05:32 +0800 Subject: [PATCH] fix a little just add null to [null,' '] --- lib/paypal-common.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/paypal-common.es6 b/lib/paypal-common.es6 index e741df9..d1def65 100644 --- a/lib/paypal-common.es6 +++ b/lib/paypal-common.es6 @@ -28,7 +28,7 @@ PayPal.config.attachSchema(new SimpleSchema({ // David Morales on SO - http://stackoverflow.com/a/11582513 getURLParameter = function(name){ - return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null; + return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[null,""])[1].replace(/\+/g, '%20'))||null; }; result = function(r){ @@ -145,4 +145,4 @@ PayPal.onPaymentFailure = function(cb){ // Stubs PayPal._onPaymentError = function(){}; -PayPal._onPaymentSuccess = function(){}; \ No newline at end of file +PayPal._onPaymentSuccess = function(){};