Skip to content

Commit

Permalink
fix: fixed caching wrong paths by axios
Browse files Browse the repository at this point in the history
  • Loading branch information
demtario committed Jul 8, 2024
1 parent 4720e20 commit b2ad3e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "store",
"version": "2.2.3",
"version": "2.2.4",
"private": true,
"scripts": {
"start": "nuxt start",
Expand Down
3 changes: 2 additions & 1 deletion plugins/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export default defineNuxtPlugin((nuxt) => {
config._beginTime = Date.now()

// Disable cache for some paths
if (pathsWithoutCache.some((url) => config.url?.includes(url))) config.cache = false
if ([...pathsWithoutCache, ...pathsWithAuth].some((url) => config.url?.includes(url)))
config.cache = false

// @ts-ignore this $i18n exists, but it's not in the Nuxt types for some reason
const apiLanguage = languageStore.getLanguageByIso(nuxt.$i18n.locale.value)
Expand Down

0 comments on commit b2ad3e7

Please sign in to comment.