简体   繁体   中英

Vue.js error in IE11

I am running Vue.js and have a component running on my page. The component works just fine in Chrome, Firefox etc, but in IE11 it is throwing the following error

Unhandled promise rejection SyntaxError: Invalid character
    "Unhandled promise rejection"
    {
        [functions]: ,
        __proto__: { },
        description: "Invalid character",
        message: "Invalid character",
        name: "SyntaxError",
        number: -2146827274,
        stack: "SyntaxError: Invalid character
            at Anonymous function (http://mydomain/js/app.js:6:21534)
            at a (http://mydomain/js/app.js:7:5220)
            at Anonymous function (http://mydomain/js/app.js:7:5344)
            at c (http://mydomain/js/app.js:1:22805)"
    }

This isn't telling me much and searching google has not helped. Does anyone know what the problem might be?

Thanks

I think your issue is that IE doesn't support promises . Any JS code that relies on using them, like

axios.get('some/url/')
        .then(response => (this.dataThing = response.data));

... is going to fail. You can use polyfills to translate this into something that IE11 understands, but I am unclear on how to implement them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM