alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 361 forks source link

Avoid Uncaught TypeError #123

Open georgeOsdDev opened 10 years ago

georgeOsdDev commented 10 years ago

When JSON contains record with null or undefined element, Sort by string will fail with Uncaught TypeError: Cannot read property 'toLowerCase' of null And dynatable process will hang up.

This PR fix that error.

I know that we can use custom sort function. But it would be nice if dynatable handle unexpected input. http://jsfiddle.net/georgeosddev/cR3p8/2/

theodorejb commented 10 years ago

Whoa, I totally didn't see this PR before I created #125. My PR also fixes the issue where reverse sort persists after cycling through ascending/descending order.

hadees commented 10 years ago

@alfajango please merge this in

vanhineam commented 9 years ago

This is still an issue many months later. Please merge this.

prune998 commented 9 years ago

Same bug here... Well, it's just a commit dude ! 2 lines to change !!!! COME ON !

prune998 commented 9 years ago

seems dynatables is really dead !

JangoSteve commented 8 years ago

Not dead, just been busy. Thanks for taking the time to look at this and submit a pull request. I think I like the solution in #125 for this issue as it's a bit cleaner and doesn't modify the original value unnecessarily.