Compare commits
2 Commits
feat/gloss
...
feat/gloss
| Author | SHA1 | Date | |
|---|---|---|---|
| ad545b52af | |||
| 467c07232e |
@@ -510,13 +510,19 @@ export function getGlossarySmartNavigation(
|
|||||||
): GlossarySmartNavigation {
|
): GlossarySmartNavigation {
|
||||||
const currentSlug = slugOfGlossaryEntry(currentEntry);
|
const currentSlug = slugOfGlossaryEntry(currentEntry);
|
||||||
const rawNavigation = currentEntry.data.navigation;
|
const rawNavigation = currentEntry.data.navigation;
|
||||||
const defaultNavigation = GLOSSARY_NAV_DEFAULTS[familyOf(currentEntry)];
|
const defaultNavigation = GLOSSARY_NAV_DEFAULTS[familyOf(currentEntry)] ?? {};
|
||||||
|
|
||||||
const navigationSource = rawNavigation ?? {
|
const navigationSource = {
|
||||||
primaryNext: undefined,
|
primaryNext: rawNavigation?.primaryNext,
|
||||||
primaryReason: undefined,
|
primaryReason: rawNavigation?.primaryReason,
|
||||||
paths: defaultNavigation ?? {},
|
paths: {
|
||||||
flows: {},
|
understand: rawNavigation?.paths?.understand ?? defaultNavigation.understand ?? [],
|
||||||
|
deepen: rawNavigation?.paths?.deepen ?? defaultNavigation.deepen ?? [],
|
||||||
|
compare: rawNavigation?.paths?.compare ?? defaultNavigation.compare ?? [],
|
||||||
|
apply: rawNavigation?.paths?.apply ?? defaultNavigation.apply ?? [],
|
||||||
|
},
|
||||||
|
flows: rawNavigation?.flows ?? {},
|
||||||
|
relationWeights: rawNavigation?.relationWeights ?? {},
|
||||||
};
|
};
|
||||||
|
|
||||||
const primaryNext = resolveGlossaryEntriesInSourceOrder(
|
const primaryNext = resolveGlossaryEntriesInSourceOrder(
|
||||||
|
|||||||
Reference in New Issue
Block a user