@Jeffrey_Cheung wrote:
I am doing this in my controller/application.js:
init(){ if (!String.prototype.includes) { String.prototype.includes = function(search, start) { if (typeof start !== 'number') { start = 0; } if (start + search.length > this.length) { return false; } else { return this.indexOf(search, start) !== -1; } }; } },
Even though it fixes the problem, it looks a really bad hack to me. How would you fix this properly?
Posts: 2
Participants: 2