astro-accelerator-utils 0.2.30 → 0.2.31

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.
@@ -132,7 +132,7 @@ export class Navigation {
132
132
 
133
133
  const pageHierarchy = topLevelPages
134
134
  .map(p => this.mapNavPage(p))
135
- .sort((a, b) => parseInt(a.order ?? Number.MAX_VALUE, 10) - parseInt(b.order ?? Number.MAX_VALUE, 10));
135
+ .sort((a, b) => parseInt(a.order, 10) - parseInt(b.order, 10));
136
136
 
137
137
  /** @type {NavPage[]} */
138
138
  const pageList = allPages.map(p => this.mapNavPage(p));
@@ -368,7 +368,7 @@ export class Navigation {
368
368
  section: page.frontmatter.navSection ?? page.frontmatter.navTitle ?? page.frontmatter.title,
369
369
  title: page.frontmatter.navTitle ?? page.frontmatter.title,
370
370
  url: url,
371
- order: page.frontmatter.navOrder,
371
+ order: page.frontmatter.navOrder ?? Number.MAX_SAFE_INTEGER,
372
372
  children: [],
373
373
  // These are later set to the correct value, but not now as we want to cache
374
374
  isOpen: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.2.30",
3
+ "version": "0.2.31",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",