Skip to content

Commit ded99c5

Browse files
author
Timon de Groot
committed
Fix javascript syntax errors
1 parent 8644cb8 commit ded99c5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

view/frontend/web/js/catalog/add-to-cart-mixin.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ define([
4747
setTimeout(function () {
4848
self.removeNotification();
4949
}, config['notificationLifetime']);
50-
}, function (data)
51-
alert('failure');
50+
}, function (data) {
5251
var title = $.mage.__('We \'re sorry, that didn\'t work.');
5352
var message = $.mage.__('No products could be added to your shopping cart. :(')
5453

@@ -69,7 +68,8 @@ define([
6968

7069
setTimeout(function () {
7170
self.removeNotification();
72-
}, config['notificationLifetime']););
71+
}, config['notificationLifetime']);
72+
});
7373
},
7474

7575
removeNotification: function () {
@@ -98,7 +98,7 @@ define([
9898
$(document).off('ajaxSuccess');
9999
});
100100

101-
$(document).on('ajaxFailure', function(event, request, settings) {
101+
$(document).on('ajaxFailure', function (event, request, settings) {
102102
if (!settings.url.indexOf('/checkout/cart/add')) {
103103
return;
104104
}
@@ -107,7 +107,6 @@ define([
107107

108108
$(document).off('ajaxFailure');
109109
});
110-
});
111110

112111
return dfd.promise();
113112
}

0 commit comments

Comments
 (0)