File tree Expand file tree Collapse file tree
packages/nitro-server/src/runtime/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,10 +116,11 @@ const VALID_COMPONENT_NAME_RE = /^[a-z][\w.-]*$/i
116116
117117async function getIslandContext ( event : H3Event ) : Promise < NuxtIslandContext > {
118118 let url = event . path || ''
119- if ( import . meta. prerender && event . path && await islandPropCache ! . hasItem ( event . path ) ) {
119+ const islandPath = url . replace ( / \? .* $ / , '' )
120+ if ( import . meta. prerender && event . path && await islandPropCache ! . hasItem ( islandPath ) ) {
120121 // for prerender, the original request URL (with query) is rehydrated from cache
121122 // so that re-renders of the same island path use the original props
122- url = await islandPropCache ! . getItem ( withoutQuery ( event . path ) ) as string
123+ url = await islandPropCache ! . getItem ( islandPath ) as string
123124 }
124125
125126 if ( ! url . startsWith ( ISLAND_PATH_PREFIX ) ) {
You can’t perform that action at this time.
0 commit comments