IE doesn’t support some of the String methods which is available with other browsers. String.includes is one of them. One of the simple solution is to define its prototype as below.
if(!String.prototype.includes) { // Set prototype only if it is not supported
String.prototype.includes = function (str) {
return this.indexOf(str) !== -1
}
}
Just add above javascript code in to a javascript file (Definitely it should execute before you call String.includes in your code) to fix this issue.
Another solution is to use indexOf instead of includes.