SweetAlert2 syntax error on Internet Explorer 11
(result) => {}
is an arrow function which is completely unsupported in IE. To fix this you'll have to use a traditional anonymous function:
swal({
// options...
}).then(function(result) {
if (result.value) {
swal('Deleted!', 'Your file has been deleted.', 'success');
}
});
IE11 does not support some modern ES6 features like arrow functions and promises.
To fix it, you should either compile your code with Babel, or use a Promise-polyfill with the traditional function
syntax:
swal(...)
.then(function(result) {
console.log(result.value)
})
Read more about SweetAlert2 usage: https://github.com/sweetalert2/sweetalert2#usage