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

Can't read properties of null error upon opening the website #564

Open
aneesafatima opened this issue Nov 26, 2024 · 2 comments
Open

Can't read properties of null error upon opening the website #564

aneesafatima opened this issue Nov 26, 2024 · 2 comments

Comments

@aneesafatima
Copy link

When I am opening the website, I get this error.

Screenshot (478)

@quozl
Copy link
Contributor

quozl commented Nov 26, 2024

Please use text so it can be searched. Firefox gives this in console;

Uncaught TypeError: document.querySelector(...) is null
    <anonymous> https://www.sugarlabs.org/js/main.js:15
    jQuery 4

@aneesafatima
Copy link
Author

The lines causing the problem are var h = document.querySelector('.logo1').innerHTML; h = h.replace(/033cd2/g, COLORS[color][0]); h = h.replace(/78e600/g, COLORS[color][1]); document.querySelector('.logo1').innerHTML = h; specifically the first line. No element in the dom could be found that has class logo1. In fact when I searched for class="logo1" there were no results in vs code. So I think somewhere a class name has been misspelled. Since these classes couldn't be found, can u guide me regarding where you intended to use these classes, logo1 and logo2.

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

No branches or pull requests

2 participants