Fixed failing karma test in work packages table sorting modal.
Fix errors mentioned by JSHint