javve/list — Issue #20: Error when sorting null elements in a HTML table
Author: peroumal1
Created: 2011-11-16 10:43:44+00:00
State: open

I'm using List.js to generate the rows of a HTML table from an array of JSON objects consisting of 7 (or so) keys/values, with some of those values equal null. Each key of a given object matches a column in the HTML table.
The issue I ran into is when using the sort function on the HTML table on a column with null values.
The sort function fails on line 252 because b is null. Typeof b in my case is "Object", so it never goes through the test if (b === undefined) on line 244.
Maybe you should consider to replace this test with "if (!b)" which will match both cases (b === undefined or b == null).