@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
|
@@ -1983,13 +1983,19 @@ function buildFullRootFromSegments(options) {
|
|
|
1983
1983
|
}
|
|
1984
1984
|
let rootPointsTo;
|
|
1985
1985
|
if (child.type === "productgroup") {
|
|
1986
|
-
|
|
1987
|
-
|
|
1986
|
+
if (child.landingPage != null && !child.landingPage.hidden) {
|
|
1987
|
+
rootPointsTo = child.landingPage.slug;
|
|
1988
|
+
} else {
|
|
1989
|
+
const defaultProduct = child.children.find((p) => p.default) ?? child.children[0];
|
|
1990
|
+
rootPointsTo = defaultProduct?.type === "product" ? defaultProduct.pointsTo : void 0;
|
|
1991
|
+
}
|
|
1988
1992
|
} else if (child.type === "versioned") {
|
|
1989
1993
|
const defaultVersion = child.children.find((v) => v.default) ?? child.children[0];
|
|
1990
1994
|
rootPointsTo = defaultVersion?.pointsTo;
|
|
1991
1995
|
} else if (child.type === "unversioned") {
|
|
1992
|
-
if (
|
|
1996
|
+
if (child.landingPage != null && !child.landingPage.hidden) {
|
|
1997
|
+
rootPointsTo = child.landingPage.slug;
|
|
1998
|
+
} else if (tabs.length > 0) {
|
|
1993
1999
|
const firstTab = tabs[0];
|
|
1994
2000
|
const pt = firstTab != null ? metaStr(firstTab.metadata, "pointsTo") : void 0;
|
|
1995
2001
|
rootPointsTo = pt != null ? pointsToSlug(pt) : void 0;
|