Skip to content

Commit 1f86449

Browse files
committed
refactor: avoid silly CodeQL warning
1 parent e6c8acc commit 1f86449

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modules/runtime/server/cache.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ function getMockForUrl(url: string): MockResult | null {
241241
}
242242

243243
// Algolia npm-search API - return mock popular packages
244-
if (host.endsWith('-dsn.algolia.net') && pathname.endsWith('/query')) {
244+
const algoliaHost = `${useRuntimeConfig().public.algolia.appId.toLowerCase()}-dsn.algolia.net`
245+
if (host === algoliaHost && pathname.endsWith('/query')) {
245246
return {
246247
data: {
247248
hits: [

0 commit comments

Comments
 (0)