From 24b417bd86986d19662df2033262de754ea6e4d0 Mon Sep 17 00:00:00 2001 From: Colin Fein Date: Thu, 31 Oct 2013 12:42:51 -0500 Subject: [PATCH] Do not navigate to unparseable page numbers. --- integration/foundation/dataTables.foundation.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/integration/foundation/dataTables.foundation.js b/integration/foundation/dataTables.foundation.js index 9e00dde..198716f 100644 --- a/integration/foundation/dataTables.foundation.js +++ b/integration/foundation/dataTables.foundation.js @@ -127,8 +127,11 @@ $.extend( $.fn.dataTableExt.oPagination, { .insertBefore( $('li:last', host) ) .bind('click', function (e) { e.preventDefault(); - oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; - fnDraw( oSettings ); + var pageNum = parseInt($('a', this).text(),10); + if ( ! isNaN(pageNum)) { + oSettings._iDisplayStart = (pageNum-1) * oPaging.iLength; + fnDraw( oSettings ); + } } ); } );