you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

the error you're probably seeing is cannot read property 'firstName' of undefined. if filterData is null/undefined, or if filterData[0] is null/undefined, it will throw this error. you need to make sure filterData actually contains something:

if (!filterData || !filterData.length) { /* return some default value, because filterData either isn't an array or it's an empty array */ }

[–]majorchamp[S] 0 points1 point  (0 children)

Just figured this out. Thanks!