fix(nuxt): don't joinURL with remote sources on NuxtIsland (#23093)

This commit is contained in:
Julien Huang 2023-09-08 21:48:42 +02:00 committed by GitHub
parent 6645b4f088
commit dfdebf2919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,7 @@ export default defineComponent({
}
// TODO: Validate response
// $fetch handles the app.baseURL in dev
const r = await eventFetch(withQuery(import.meta.dev && import.meta.client ? url : joinURL(config.app.baseURL ?? '', url), {
const r = await eventFetch(withQuery(((import.meta.dev && import.meta.client) || props.source) ? url : joinURL(config.app.baseURL ?? '', url), {
...props.context,
props: props.props ? JSON.stringify(props.props) : undefined
}))