TypeError: Cannot read property 'sort' of undefined TypeError: Cannot read property 'sort' of undefined

#1

I have sorting issue ? any one have idea how to fix this .

Ionic 2
Angular 4

#2

Don’t call sort() on something that is undefined.,