jquery.tablesorter: Sort invalid elements as -Infinity
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Fri, 30 Dec 2016 13:10:32 +0000 (14:10 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sun, 1 Jan 2017 18:44:07 +0000 (18:44 +0000)
commitea0f879b32a9f0e77e74d7977b17e763afd27deb
treef2b509a45efb8a9fe816784d39824f96db54ad81
parentd846bf5705c8f87cde1e9b1f9295387a1fa417d4
jquery.tablesorter: Sort invalid elements as -Infinity

NaN is problematic when sorting. We used 0 before, but that means that
these items get mixed in between 0 elements or in the middle of a column
when it has both negative and positive numbers. Therefore sort as
-Infinity instead, which is a proper number and will always sort to the
edge.

Bug: T154307
Change-Id: I4837669205a6c6d470f19b26d721efd2ccdcc3a0
resources/src/jquery/jquery.tablesorter.js
tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js