@eitanavgil  - please change it to var sortFunction = sortByLabel(a,b){...}