VadimDez / ngx-order-pipe

▼ Angular 5+ orderBy pipe
https://vadimdez.github.io/ngx-order-pipe/
MIT License
243 stars 57 forks source link

fix error when expression point on sub-property of an undefined object #87

Closed Thorolf13 closed 4 years ago

Thorolf13 commented 4 years ago

avoid error "Cannot use 'in' operator to search for 'property' in undefined"

test case :

const list = [{a:{b:1}},   {a:{b:2}},   {a:undefined}];
<div *ngFor="let item of list | orderBy:'a.b'">
</div>