Skip to content

Commit

Permalink
a5ef81cfb42bc16cc1eb504a704e49bf51b3ac50 Fix: Safari 9 compatibility …
Browse files Browse the repository at this point in the history
…- doesn't have a `childNodes.forEach` function.

https://datatables.net/forums/discussion/79829

Sync to source repo @a5ef81cfb42bc16cc1eb504a704e49bf51b3ac50
  • Loading branch information
dtbuild committed Sep 16, 2024
1 parent 11742c3 commit b13c376
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.1.6",
"last-sync": "c1fb50aa929c0eccf8c2f1722feb7af141389b7c"
"last-sync": "a5ef81cfb42bc16cc1eb504a704e49bf51b3ac50"
}
4 changes: 2 additions & 2 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -13511,14 +13511,14 @@

// Save text node content for macro updating
var textNodes = [];
div.find('label')[0].childNodes.forEach(function (el) {
Array.from(div.find('label')[0].childNodes).forEach(function (el) {
if (el.nodeType === Node.TEXT_NODE) {
textNodes.push({
el: el,
text: el.textContent
});
}
})
});

// Update the label text in case it has an entries value
var updateEntries = function (len) {
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13458,14 +13458,14 @@ DataTable.feature.register( 'pageLength', function ( settings, opts ) {

// Save text node content for macro updating
var textNodes = [];
div.find('label')[0].childNodes.forEach(function (el) {
Array.from(div.find('label')[0].childNodes).forEach(function (el) {
if (el.nodeType === Node.TEXT_NODE) {
textNodes.push({
el: el,
text: el.textContent
});
}
})
});

// Update the label text in case it has an entries value
var updateEntries = function (len) {
Expand Down

0 comments on commit b13c376

Please sign in to comment.