Don't work on IE11
Closed this issue · 2 comments
klivak commented
I use this vue-slick slider like a component for my laravel website.
And I have an error when open website in IE11.
SCRIPT5009: "Promise" не определено // (translation - "is undefined")
app.js (69098,3)
error is here
// Check if the request came from the browser and is not server rendered
if (typeof window !== 'undefined') {
Promise.resolve().then(function () { return slick$1; });
}
klivak commented
Fixed this by adding this script before main script.
<script>
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
var trident = ua.indexOf('Trident/');
var edge = ua.indexOf('Edge/');
if ((msie > 0) || (trident > 0) || (edge > 0)) {
var blueBird = document.createElement('script');
blueBird.setAttribute('src', 'https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.5/bluebird.min.js');
document.head.appendChild(blueBird);
}
</script>
danielmarkavis commented
Has this been looked at by the author(s) of vue-slick?
Seems like a major issue.
Edit:
I am using es6-promise, which in its current form (4.2.5) is bugged.
use
<script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.5/bluebird.min.js"></script>
in your <head>
.