因此,在此示例中,回调函数语法将在Safari和移动Chrome和Safari上中断。
utils.api.cart.getContent(options, (err, response) => {
$modalOverlay.hide();
$cartCounter.text(response.data.cart.items.length + " items in your cart");
$modalContent.html(response.content);
});
应该写成......
utils.api.cart.getContent(options, function(err, response) {
$modalOverlay.hide();
$cartCounter.text(response.data.cart.items.length + " items in your cart");
$modalContent.html(response.content);
});
答案 0 :(得分:0)