Fix JavaScript error in showSection function

This commit is contained in:
2025-10-02 08:18:54 -03:00
parent e39668e480
commit b10515fe43

View File

@@ -1124,8 +1124,14 @@
}); });
// Show selected section // Show selected section
document.getElementById(section + 'Section').style.display = 'block'; const sectionElement = document.getElementById(section + 'Section');
document.querySelector(`[data-section="${section}"]`).classList.add('active'); if (sectionElement) {
sectionElement.style.display = 'block';
}
const navElement = document.querySelector(`[data-section="${section}"]`);
if (navElement) {
navElement.classList.add('active');
}
// Load section data // Load section data
switch(section) { switch(section) {