Its a bug but it can be fixed (thanks to this answer). Add this code to your JavaScript.
String.prototype.contains = function(string, separator){
return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : String(this).indexOf(string) > -1;
};
Here is a fixed demo