Commit 83a499e00471bb2b3fbdd0076b1c0a4b960c38e3

Authored by Igor Kulikov
1 parent 50e96024

IE fix: String.includes polyfill

Showing 1 changed file with 13 additions and 0 deletions
... ... @@ -53,6 +53,19 @@
53 53 return result;
54 54 };
55 55 }
  56 + if (!String.prototype.includes) {
  57 + String.prototype.includes = function(search, start) {
  58 + if (angular.isNumber(start)) {
  59 + start = 0;
  60 + }
  61 +
  62 + if (start + search.length > this.length) {
  63 + return false;
  64 + } else {
  65 + return this.indexOf(search, start) !== -1;
  66 + }
  67 + };
  68 + }
56 69
57 70 (function (arr) {
58 71 arr.forEach(function (item) {
... ...