Fixed incorrect logic in getCurrentSort method

The sortFunction var is undefined at the location of the change, and I think the intent is clearly to set sortDirection. This looks to be a typo.