astro-accelerator-utils 0.3.101 → 0.3.102

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.
@@ -60,7 +60,7 @@ export class Navigation {
60
60
  }
61
61
  });
62
62
 
63
- if (customCount === 0) {
63
+ if (customCount === 0 && navPages.length > 0) {
64
64
  navPages[navPages.length -1].url = currentUrl.pathname;
65
65
  }
66
66
 
package/lib/v1/posts.mjs CHANGED
@@ -24,10 +24,12 @@ export class Posts {
24
24
  all () {
25
25
  const key = 'v1_posts.all';
26
26
 
27
- return this.cache.get(key, () => {
27
+ const posts = this.cache.get(key, () => {
28
28
  const pageImportResult = this.fetchAll();
29
29
  return Object.values(pageImportResult);
30
30
  });
31
+
32
+ return [...posts];
31
33
  }
32
34
 
33
35
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.3.101",
3
+ "version": "0.3.102",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",