Skip to content

TypeError when calling getSQL with invalid rules #595

Closed
@eagano

Description

@eagano

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):

  1. scroll down to Import/Export demo
  2. open the console
  3. click Reset
  4. click SQL (any of the four SQL choices)
  5. TypeError thrown on null group (argument to parse() in getSQL)

Alternatively:

  1. Click Set rules from SQL
  2. Click Add Rule
  3. Click SQL (any of the four SQL choices)
  4. TypeError thrown on null group (argument to parse() in getSQL)

It appears that validate() returns null when there are rules in error.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentified bug which needs a fix

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions