Fix chat on pages without pricing section — guard pricing-period element access in script.js to prevent TDZ crash
This commit is contained in:
+4
-3
@@ -283,10 +283,11 @@ function updatePeriodDisplay() {
|
||||
? "/ month ✦ yearly"
|
||||
: "/ month";
|
||||
}
|
||||
document
|
||||
.getElementById("pricing-period")
|
||||
.addEventListener("change", updatePeriodDisplay);
|
||||
const pricingPeriod = document.getElementById("pricing-period");
|
||||
if (pricingPeriod) {
|
||||
pricingPeriod.addEventListener("change", updatePeriodDisplay);
|
||||
updatePeriodDisplay(); // fire on load so yearly bonuses show by default
|
||||
}
|
||||
const SERVER_WEBHOOK = "https://n8n.derez.ai/webhook/server";
|
||||
initServerLocations(); // fetch live server availability
|
||||
|
||||
|
||||
Reference in New Issue
Block a user