aquint / ion-alpha-scroll

Alphabetically indexed list with alpha scroll bar.
99 stars 35 forks source link

Cannot read property 'toUpperCase' of null #10

Open cesarin3134 opened 8 years ago

cesarin3134 commented 8 years ago

If I pass and object array and the value of the property is null, i get the this error :

Cannot read property 'toUpperCase' of null

I took a look to the source code and it breaks at the line number 58 : var letter = scope.items[i][attrs.key].toUpperCase().charAt(0); this is because the value of scope.items[i][attrs.key] is null. I think that it would be good if the attrs.key passed is null, It should take the next attribute value of the object. does somebody know how can i fix it ? thanks.