From 8f356ab9178df526c2e532549033df837bc2f978 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 5 Dec 2013 12:01:33 +0000 Subject: [PATCH] Dev fix: When no ordering was aplied to the table, the next order would throw an error --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 029f140b..7f212138 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -15c2d8b6fcb5b0c9d08c43e2b66f996594cf4d12 +b8cd533bc7dec1484d23ef0f8d5de1c440b2b4cf diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 545503c5..bb9ad54f 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -4368,7 +4368,7 @@ sorting[sorting.length-1]._idx = 0; } } - else if ( sorting[0][0] == colIdx ) { + else if ( sorting.length && sorting[0][0] == colIdx ) { // Single column - already sorting on this column, modify the sort nextSortIdx = next( sorting[0] );