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

TypeError: Cannot read properties of undefined (reading 'childNodes') occurs sometimes in course.js #6247

Open
empty-codes opened this issue Mar 7, 2025 · 0 comments
Labels

Comments

@empty-codes
Copy link
Contributor

What is happening?

TypeError: Cannot read properties of undefined (reading 'childNodes') occurs sometimes in course.js when initializing a List object.

studentsList = new List('users', {

Relevant Stack Trace:

TypeError: Cannot read properties of undefined (reading 'childNodes')
at this.getItemSource(./node_modules/list.js/src/templater.js:37:29)
at Templater(./node_modules/list.js/src/templater.js:6:28)
at module.exports(./node_modules/list.js/src/templater.js:173:10)
at init.start(./node_modules/list.js/src/index.js:53:27)
at module.exports(./node_modules/list.js/src/index.js:261:8)
at document.onreadystatechange(./app/assets/javascripts/utils/course.js:72:20)

Expected behavior

Error should not occur.

Additional context

The exact course of the error is not known so your first step should be trying to reproduce the error.

From my research, it might be caused by the #users table not being fully loaded / rendered / has missing elements / wrong structure. I added isTableValid('#users') in this commit to check if the table exists before calling new List(...) but that did not fix the error.

@empty-codes empty-codes added the bug label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant