Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

plans: Remove unnecessary comparison-table conditional.

Karl Stolley5f509f5b0c0b
diff --git a/web/src/portico/landing-page.js b/web/src/portico/landing-page.js
index e0e239d087d..82b7dc343b6 100644
--- a/web/src/portico/landing-page.js
+++ b/web/src/portico/landing-page.js
@@ -148,23 +148,16 @@ $(() => {
$pricing_wrapper.removeClass("showing-cloud showing-self-hosted");
$pricing_wrapper.addClass(`showing-${tab_to_show.slice(1)}`);
- const $comparison_table = $(".zulip-plans-comparison");
-
- // Not all pages that show plans include the comparison
- // table, but when it's present, make sure to align the
- // comparison table with the current active plans tab
- if ($comparison_table.length > 0) {
- // Make sure that links coming from elsewhere scroll
- // to the comparison table
- if (target_hash.includes("plan-comparison")) {
- document.querySelector(target_hash).scrollIntoView();
- }
- const plans_columns_count = tab_to_show.slice(1) === "self-hosted" ? 4 : 3;
-
- // Set the correct values for span and colspan
- $(".features-col-group").attr("span", plans_columns_count);
- $(".subheader-filler").attr("colspan", plans_columns_count);
+ // Make sure that links coming from elsewhere scroll
+ // to the comparison table
+ if (target_hash.includes("plan-comparison")) {
+ document.querySelector(target_hash).scrollIntoView();
}
+
+ const plans_columns_count = tab_to_show.slice(1) === "self-hosted" ? 4 : 3;
+ // Set the correct values for span and colspan
+ $(".features-col-group").attr("span", plans_columns_count);
+ $(".subheader-filler").attr("colspan", plans_columns_count);
}
});