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(){};