diff --git a/resources/assets/src/js/common/polyfill.js b/resources/assets/src/js/common/polyfill.js index 95695b03..5e0c6773 100644 --- a/resources/assets/src/js/common/polyfill.js +++ b/resources/assets/src/js/common/polyfill.js @@ -2,17 +2,9 @@ // polyfill of String.prototype.includes if (!String.prototype.includes) { - String.prototype.includes = function(search, start) { - 'use strict'; - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > this.length) { - return false; - } else { - return this.indexOf(search, start) !== -1; - } + String.prototype.includes = function(search) { + // Copied from core-js + return !!~this.indexOf(search, arguments.length > 1 ? arguments[1] : undefined); }; }