diff --git a/site/src/components/intake/steps/CategoryStep.astro b/site/src/components/intake/steps/CategoryStep.astro index 0d5151c..591b2be 100644 --- a/site/src/components/intake/steps/CategoryStep.astro +++ b/site/src/components/intake/steps/CategoryStep.astro @@ -173,8 +173,13 @@ import { LINE_105_CATALOG, LINE_105_BY_ID } from "../../../lib/line_105_catalog" import { LINE_105_CATALOG, LINE_105_BY_ID } from "../../../lib/line_105_catalog"; const err = document.getElementById("pw-cat-err") as HTMLDivElement; - const wizard = document.getElementById("pw-wizard") as HTMLDivElement; - const result = document.getElementById("pw-result") as HTMLDivElement; + const wizard = document.getElementById("pw-wizard") as HTMLDivElement | null; + const result = document.getElementById("pw-result") as HTMLDivElement | null; + + // Guard: CategoryStep only runs on pages that have the category wizard + if (!wizard) { + // Not a 499-A page — skip all CategoryStep logic + } else { // Wizard state const answers: Record = {}; @@ -469,4 +474,6 @@ import { LINE_105_CATALOG, LINE_105_BY_ID } from "../../../lib/line_105_catalog" } err.hidden = true; }); + + } // end of: if (!wizard) {} else {