Skip to content

Commit ccf88d2

Browse files
authored
Merge branch 'main' into fix-peer-deps
2 parents 4b1d372 + cbe0cb0 commit ccf88d2

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

app/composables/useNpmRegistry.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,11 @@ export function useNpmSearch(
382382

383383
// Update cache
384384
if (cache.value && cache.value.query === q) {
385+
const existingNames = new Set(cache.value.objects.map(obj => obj.package.name))
386+
const newObjects = response.objects.filter(obj => !existingNames.has(obj.package.name))
385387
cache.value = {
386388
query: q,
387-
objects: [...cache.value.objects, ...response.objects],
389+
objects: [...cache.value.objects, ...newObjects],
388390
total: response.total,
389391
}
390392
} else {

nuxt.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ export default defineNuxtConfig({
219219
},
220220
},
221221

222+
debug: {
223+
hydration: true,
224+
},
225+
222226
vite: {
223227
optimizeDeps: {
224228
include: [

0 commit comments

Comments
 (0)