_.s3haj._
_.s3haj._
KPCKevin Powell - Community
Created by _.s3haj._ on 7/3/2023 in #front-end
Why is it showing null?
Uncaught TypeError: Cannot read properties of null (reading 'innerText') Getting this error, heres the codepen: https://codepen.io/Dhami2009/pen/zYMwpxQ it happens on line 90, when you open the little code icon on top-right, clicking onto section button,after that some prompts come and the error comes on the third prompt. the code is in a if statement like this:
if (subCtgName) {
subCtgTitle.innerText = subCtgName;
}
if (subCtgName) {
subCtgTitle.innerText = subCtgName;
}
the if statements detects something in the subCtgName, then only it will exexute it, then why does it say null after that, the if gets executed but it outputs as null, whyyyyy? (idk what i am saying)
7 replies