Skip to content

Commit a55bc53

Browse files
committed
fix: better dx
1 parent 55632e2 commit a55bc53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/data-loaders/defineColadaLoader.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,10 @@ export function defineColadaLoader<Data>(
342342
!this.tracked.has(joinKeys(key))
343343
) {
344344
console.warn(
345-
`A query was defined with the same key as the loader "[${key.join(', ')}]" but with different "query" function.\nSee https://pinia-colada.esm.dev/#TODO`
345+
`A query was defined with the same key as the loader "[${key.join(', ')}]". If the "key" is meant to be the same, you should directly use the data loader instead. If not, change the key of the "useQuery()".\nSee https://pinia-colada.esm.dev/#TODO`
346346
)
347+
// avoid a crash that requires the page to be reloaded
348+
return
347349
}
348350
this.tracked.get(joinKeys(key))!.ready = true
349351
}

0 commit comments

Comments
 (0)