Don't show apple pay if not supported

This commit is contained in:
Hillel Coren 2018-01-15 22:45:18 +02:00
parent d6efea0080
commit 2417005b23

View File

@ -137,11 +137,8 @@
$(function() { $(function() {
// Check the availability of the Payment Request API first. // Check the availability of the Payment Request API first.
paymentRequest.canMakePayment().then(function(result) { paymentRequest.canMakePayment().then(function(result) {
if (result) { if (! result) {
// do nothing $('#paymentButtons ul.dropdown-menu li').find('a[href$="apple_pay"]').remove();
} else {
console.log('not supported');
$('#paymentButtons ul.dropdown-menu li').last().remove();
} }
}); });