When a table contains empty values, sorting by IP addresses using the `ip-address.js` sorting plugin caused erratic sorting behaviour. The empty lines are not sorted correctly and remain scattered about the rest of the rows. This seems to be due to a type issue: The ip-address sorting plugin has a guard-clause if-statement that checks if the value that is to be sorted is false-y. In that case, the integer `0` is returned. The function seems to usually normalise ip addresses to a lexicographically sortable format, and values like `"86b4b93fbbf0418144b55bc45057b720"` and `"173040030054"` are returned. The resulting comparison between strings and integers seems to cause misplaced empty rows and all-over weird sorting behaviour. This commit changes the value returned by the guard-clause to the string value `"000000000000"`, which is simliar to the normalized IPv4 format already used by the plugin.pull/531/head
parent
b820aaeee5
commit
5470f7a42d
Loading…
Reference in new issue