Skip to content

Commit c12b06c

Browse files
committedSep 23, 2021
af651f6ab12052c1cb5d67cb73ad3284e2c296cb Fix: Add polyfill for Array.prototype.includes as we use it in extensions now and IE11 (which is still supported) does not have Array.prototype.includes
DD-2309 Sync to source repo @af651f6ab12052c1cb5d67cb73ad3284e2c296cb
1 parent 59a8d3f commit c12b06c

File tree

3 files changed

+52
-42
lines changed

3 files changed

+52
-42
lines changed
 

‎datatables.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
],
1010
"src-repo": "http://github.com/DataTables/DataTablesSrc",
1111
"last-tag": "1.11.2",
12-
"last-sync": "e835ddc5b800c47f7e9e32a91cc522f8ca7ced5c"
12+
"last-sync": "af651f6ab12052c1cb5d67cb73ad3284e2c296cb"
1313
}

‎js/jquery.dataTables.js

+10
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,16 @@
16221622
};
16231623
}
16241624

1625+
if (! Array.prototype.includes) {
1626+
Array.prototype.includes = function (search, start) {
1627+
if (start === undefined) {
1628+
start = 0;
1629+
}
1630+
1631+
return this.indexOf(search, start) !== -1;
1632+
};
1633+
}
1634+
16251635
// .trim() polyfill
16261636
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim
16271637
if (!String.prototype.trim) {

‎js/jquery.dataTables.min.js

+41-41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.