Skip to content

Commit

Permalink
fix(nuxt): test generated pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Feb 16, 2023
1 parent e9ff34a commit af55b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/composables/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function _getPayloadURL (url: string, opts: LoadPayloadOptions = {}) {
if (u.search) {
throw new Error('Payload URL cannot contain search params: ' + url)
}
if (u.host !== 'localhost' || hasProtocol(url, true)) {
if (u.host !== 'localhost' || hasProtocol(u.pathname, true)) {
throw new Error('Payload URL must not include hostname: ' + url)
}
const hash = opts.hash || (opts.fresh ? Date.now() : '')
Expand Down

0 comments on commit af55b98

Please sign in to comment.