Skip to content

Empty Lists in Nunjucks template cause error. #1753

Open

Description

@tkallady

Using a custom gitops json file which results in gqlHelper.js receiving an empty list for boardCounts, fileTypeList, etc. leads to an invalid graphql syntax error when it gets parsed.
This can be fixed by checking for empty list first.

The issue can be replicated by using any gitops file that leads to empty list. E.g. set boardCounts: [] and the error occurs.

Also, fileTypeList gets set to empty list any time a data dictionary that is metadata only (no data file type) is used (common in many examples online). This also causes the error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions