Skip to content

Commit

Permalink
c5082522d26409699bb6f505e2f2f6bb544de125 Performance: Do not apply so…
Browse files Browse the repository at this point in the history
…rt when there is only one match (#277)

Sync to source repo @c5082522d26409699bb6f505e2f2f6bb544de125
  • Loading branch information
dtbuild committed May 2, 2024
1 parent 09969eb commit 605656c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 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.0.5",
"last-sync": "d56657e09784e692a11cabdbdc58873a0de8d9df"
"last-sync": "c5082522d26409699bb6f505e2f2f6bb544de125"
}
4 changes: 4 additions & 0 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -5523,6 +5523,10 @@
* @param {*} settings
*/
function _fnSortDisplay(settings, display) {
if (display.length < 2) {
return;
}

var master = settings.aiDisplayMaster;
var masterMap = {};
var map = {};
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: 4 additions & 0 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5470,6 +5470,10 @@ function _fnSortAttachListener(settings, node, selector, column, callback) {
* @param {*} settings
*/
function _fnSortDisplay(settings, display) {
if (display.length < 2) {
return;
}

var master = settings.aiDisplayMaster;
var masterMap = {};
var map = {};
Expand Down

0 comments on commit 605656c

Please sign in to comment.