fix(live-preview): fallback serverURL to localhost instead of empty string
postMessage with empty string origin throws "Invalid target origin ''" Use same fallback as payload.config.ts — http://localhost:3000. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1defcc13b0
commit
965ffc2084
1 changed files with 1 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ export function RefreshRouteOnSave() {
|
|||
return (
|
||||
<PayloadLivePreview
|
||||
refresh={() => router.refresh()}
|
||||
serverURL={process.env.NEXT_PUBLIC_SITE_URL ?? ''}
|
||||
serverURL={process.env.NEXT_PUBLIC_SITE_URL ?? 'http://localhost:3000'}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue