Closed
Description
The getSQL() function is throwing a TypeError when there is at least one invalid rule present.
Steps to reproduce, from the QueryBuilder demo page (http://querybuilder.js.org/demo.html):
- scroll down to Import/Export demo
- open the console
- click Reset
- click SQL (any of the four SQL choices)
- TypeError thrown on null group (argument to parse() in getSQL)
Alternatively:
- Click Set rules from SQL
- Click Add Rule
- Click SQL (any of the four SQL choices)
- TypeError thrown on null group (argument to parse() in getSQL)
It appears that validate() returns null when there are rules in error.