Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: More descriptive error message when DOM node for container was not found #1354

Closed
1 task
gionkunz opened this issue Sep 8, 2022 · 0 comments · Fixed by #1392
Closed
1 task

[Bug]: More descriptive error message when DOM node for container was not found #1354

gionkunz opened this issue Sep 8, 2022 · 0 comments · Fixed by #1392
Assignees
Labels

Comments

@gionkunz
Copy link
Collaborator

gionkunz commented Sep 8, 2022

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

Currently, when Chartist is used in dynamic rendering situations or the wrong selector is passed to initialize Chartist, we are having a very unspecific error message directly from the DOM API:

[ERROR TypeError: Cannot read property 'querySelectorAll' of null]

We should catch this error and enrich it with better description of what went wrong so users know how to fix it.

Reproduction

Initialize Chartist with an invalid selector

Chartist version

v2.x

Possible solution

Enrich the error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants