Skip to content

Commit

Permalink
refactor(plugin-vue): simplify logic of resolving script (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
HydratedPig committed Nov 20, 2023
1 parent 8383f49 commit 2ac1045
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/plugin-vue/src/script.ts
Expand Up @@ -53,8 +53,7 @@ export function resolveScript(
return null
}

const cacheToUse = ssr ? ssrCache : clientCache
const cached = cacheToUse.get(descriptor)
const cached = getResolvedScript(descriptor, ssr)
if (cached) {
return cached
}
Expand Down Expand Up @@ -91,7 +90,7 @@ export function resolveScript(
}
}

cacheToUse.set(descriptor, resolved)
setResolvedScript(descriptor, resolved, ssr)
return resolved
}

Expand Down

0 comments on commit 2ac1045

Please sign in to comment.