Dont sort if null is returned from custom sort
update history
Automatically rewritten for npm.