shakee93 / vue-toasted

🖖 Responsive Touch Compatible Toast plugin for VueJS 2+
https://shakee93.github.io/vue-toasted/
MIT License
2.21k stars 195 forks source link

IE11 Cannot redefine non-configurable property 'includes' #141

Open Javimtib92 opened 5 years ago

Javimtib92 commented 5 years ago

Hi,

After including vue-toasted library ie11 crashes. I think it's because it's redefining includes in this block

// string includes polyfill
if (!String.prototype.includes) {
    Object.defineProperty(String.prototype, 'includes', {
        value: function value(search, start) {
            if (typeof start !== 'number') {
                start = 0;
            }

            if (start + search.length > this.length) {
                return false;
            } else {
                return this.indexOf(search, start) !== -1;
            }
        }
    });
}
freitasskeeled commented 5 years ago

Hi, I'm having the same problem on the last version of the package. Any updates?

natbentley commented 4 years ago

+1 here. The supplied PR seems to fix it.