I am currently experiencing an issue with a filter field in my code. The filter works fine when all the package data is present, however, some items do not have a package field. As a result, I need to filter based on the package name but I am encountering the following error:
ERROR TypeError: Cannot read property 'package_id' of undefined
Pipe.ts:
if(user.package_detail.package_id) {
if(parseInt(user.package_detail.package_id) !== parseInt(filter[field])) {
return false;
}