We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd65bc6 commit e8e1bccCopy full SHA for e8e1bcc
app/composables/useNpmRegistry.ts
@@ -337,6 +337,11 @@ export function useNpmSearch(
337
338
const result = packumentToSearchResult(pkg, downloads?.downloads)
339
340
+ // If query changed/outdated, return empty search response
341
+ if (q !== toValue(query)) {
342
+ return emptySearchResponse
343
+ }
344
+
345
cache.value = {
346
query: q,
347
objects: [result],
@@ -357,6 +362,11 @@ export function useNpmSearch(
357
362
60,
358
363
)
359
364
365
366
367
368
369
360
370
361
371
372
objects: response.objects,
0 commit comments