@fern-api/fdr-sdk 1.2.45-1a67633024 → 1.2.45-3a874ebe1e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/navigation/ledger-root-builder.js +9 -3
- package/dist/js/navigation/ledger-root-builder.js.map +1 -1
- package/dist/js/navigation/ledger-root-builder.mjs +9 -3
- package/dist/js/navigation/ledger-root-builder.mjs.map +1 -1
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts +2 -0
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.js +227 -0
- package/dist/navigation/__test__/ledger-root-builder.landingPageRedirect.test.js.map +1 -0
- package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.js +59 -1
- package/dist/navigation/__test__/ledger-root-builder.unversionedPointsTo.test.js.map +1 -1
- package/dist/navigation/ledger-root-builder.d.ts.map +1 -1
- package/dist/navigation/ledger-root-builder.js +14 -5
- package/dist/navigation/ledger-root-builder.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts +2 -0
- package/dist/types/navigation/__test__/ledger-root-builder.landingPageRedirect.test.d.ts.map +1 -0
- package/dist/types/navigation/ledger-root-builder.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2024,13 +2024,19 @@ function buildFullRootFromSegments(options) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
let rootPointsTo;
|
|
2026
2026
|
if (child.type === "productgroup") {
|
|
2027
|
-
|
|
2028
|
-
|
|
2027
|
+
if (child.landingPage != null && !child.landingPage.hidden) {
|
|
2028
|
+
rootPointsTo = child.landingPage.slug;
|
|
2029
|
+
} else {
|
|
2030
|
+
const defaultProduct = child.children.find((p) => p.default) ?? child.children[0];
|
|
2031
|
+
rootPointsTo = defaultProduct?.type === "product" ? defaultProduct.pointsTo : void 0;
|
|
2032
|
+
}
|
|
2029
2033
|
} else if (child.type === "versioned") {
|
|
2030
2034
|
const defaultVersion = child.children.find((v) => v.default) ?? child.children[0];
|
|
2031
2035
|
rootPointsTo = defaultVersion?.pointsTo;
|
|
2032
2036
|
} else if (child.type === "unversioned") {
|
|
2033
|
-
if (
|
|
2037
|
+
if (child.landingPage != null && !child.landingPage.hidden) {
|
|
2038
|
+
rootPointsTo = child.landingPage.slug;
|
|
2039
|
+
} else if (tabs.length > 0) {
|
|
2034
2040
|
const firstTab = tabs[0];
|
|
2035
2041
|
const pt = firstTab != null ? metaStr(firstTab.metadata, "pointsTo") : void 0;
|
|
2036
2042
|
rootPointsTo = pt != null ? pointsToSlug(pt) : void 0;
|