can somebody tell me why im getting this error ?

12 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
samidev
samidev2y ago
but like in js or html or css ? cuz it shows only in console
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Wolle
Wolle2y ago
You got someObject.CodeMirror somewhere in your code and that someObject is null at this point.
samidev
samidev2y ago
can i send the code and like tell me what is wrong cuz i got no idea
// sticky nabvar
let header = document.querySelector('header');
let menu = document.querySelector('#menu-icon');
let navbar = document.querySelector('.navbar');


window.addEventListener('scroll', () => {
header.classList.toggle('shadow', window.scrollY > 0);
});

menu.onclick = () => {
navbar.classList.toggle('active');
}
window.onscroll = () => {
navbar.classList.remove('active');
}

//dark mode
let darkmode = document.querySelector('#darkmode');

darkmode.onclick = () => {
if(darkmode.classList.contains('bx-moon')){
darkmode.classList.replace('bx-moon', 'bx-sun');
document.body.classList.add('active');
}else {
darkmode.classList.replace('bx-sun', 'bx-moon');
document.body.classList.remove('active');
}
}

// SCroll top
let scrollTop = document.querySelector(".scroll-top");

window.addEventListener("scroll", () => {
scrollTop.classList.toggle("scroll-active", window.scrollY >= 20);
});
// sticky nabvar
let header = document.querySelector('header');
let menu = document.querySelector('#menu-icon');
let navbar = document.querySelector('.navbar');


window.addEventListener('scroll', () => {
header.classList.toggle('shadow', window.scrollY > 0);
});

menu.onclick = () => {
navbar.classList.toggle('active');
}
window.onscroll = () => {
navbar.classList.remove('active');
}

//dark mode
let darkmode = document.querySelector('#darkmode');

darkmode.onclick = () => {
if(darkmode.classList.contains('bx-moon')){
darkmode.classList.replace('bx-moon', 'bx-sun');
document.body.classList.add('active');
}else {
darkmode.classList.replace('bx-sun', 'bx-moon');
document.body.classList.remove('active');
}
}

// SCroll top
let scrollTop = document.querySelector(".scroll-top");

window.addEventListener("scroll", () => {
scrollTop.classList.toggle("scroll-active", window.scrollY >= 20);
});
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
samidev
samidev2y ago
ok no worries brother it is just my pf potfolio so it has so much code in it
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
samidev
samidev2y ago
https://codepen.io/ssamimustafa/pen/KKBQeXW well this is how much i can do
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
samidev
samidev2y ago
i dont think that is in my code I sent u all my code If. U want when im home i can send the files with we transfer so u can easily find the error if u can.
WebMechanic
WebMechanic2y ago
as @daswolle already pointed out. Somewhere in your codebase is an object that's supposed to have a CodeMirror property but that object itself is null no it cannot have said property. hence the console error. You presumably didn't write that particular code, or you'd know that CodeMirror is a source code editor used somewhere in that project. So maybe search for that name to narrow things down.