angularjs custom filter undefined checks

Handsontable JavaScript Spreadsheet Most popular component for web apps
Add some undefined checks to your custom filters to prevent them breaking when bad/malformed/wrong type/data is passed to it.
For example


Expects users to be an array and current to be a number (string for loose comparisons).



If they were different format or undefined it would break horribly.
Different ways you can check.


Sam Deering

Sam Deering

Sam is a web developer, online entrepreneur and investor. In his spare time he enjoys coding, playing chess and sharing what he learns with others.

Leave a Reply

Your email address will not be published. Required fields are marked *