update app and index.html
This commit is contained in:
@@ -83,12 +83,20 @@
|
||||
}
|
||||
|
||||
function setActiveSection(nextSection) {
|
||||
const previousSection = activeSection;
|
||||
const requestedSection = VALID_SECTIONS.has(nextSection) ? nextSection : "home";
|
||||
const normalized = config.isSectionAccessible?.(requestedSection) === false
|
||||
? "home"
|
||||
: requestedSection;
|
||||
activeSection = normalized;
|
||||
|
||||
document.dispatchEvent(new CustomEvent("section:changed", {
|
||||
detail: {
|
||||
previousSection,
|
||||
activeSection
|
||||
}
|
||||
}));
|
||||
|
||||
const elements = config.elements || {};
|
||||
const ensure = config.ensure || {};
|
||||
const referenceData = getReferenceData();
|
||||
|
||||
Reference in New Issue
Block a user