1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix JS error

This commit is contained in:
Joshua Dwire 2016-05-18 10:00:33 -04:00
parent f0d276be4c
commit e05bbd18ef

View File

@ -77,8 +77,10 @@ $(function(){
$('#wepay-country input').change(handleCountryChange)
function handleCountryChange(){
var country = $('#wepay-country input:checked').val();
$('#wepay-accept-debit').toggle(country == 'CA');
$('#wepay-tos-link').attr('href', 'https://go.wepay.com/terms-of-service-' + country.toLowerCase());
if(country) {
$('#wepay-accept-debit').toggle(country == 'CA');
$('#wepay-tos-link').attr('href', 'https://go.wepay.com/terms-of-service-' + country.toLowerCase());
}
}
handleCountryChange();
})