Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't work on IE11 #80

Open
klivak opened this issue Nov 14, 2018 · 2 comments

Comments

@klivak
Copy link

@klivak klivak commented Nov 14, 2018

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

This comment has been minimized.

Copy link
Author

@klivak klivak commented Nov 14, 2018

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

This comment has been minimized.

Copy link

@danielmarkavis danielmarkavis commented Jan 14, 2019

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>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.