mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 15:42:09 +00:00
fix(nuxt3): remove lookbehind for safari support (#3115)
This commit is contained in:
parent
8056b8e171
commit
dabb72ed7c
@ -6,8 +6,8 @@ export type RouterViewSlotProps = Parameters<InstanceOf<typeof RouterView>['$slo
|
|||||||
|
|
||||||
const interpolatePath = (route: RouteLocationNormalizedLoaded, match: RouteLocationMatched) => {
|
const interpolatePath = (route: RouteLocationNormalizedLoaded, match: RouteLocationMatched) => {
|
||||||
return match.path
|
return match.path
|
||||||
.replace(/(?<=:\w+)\([^)]+\)/g, '')
|
.replace(/(:\w+)\([^)]+\)/g, '$1')
|
||||||
.replace(/(?<=:\w+)[?+*]/g, '')
|
.replace(/(:\w+)[?+*]/g, '$1')
|
||||||
.replace(/:\w+/g, r => route.params[r.slice(1)]?.toString() || '')
|
.replace(/:\w+/g, r => route.params[r.slice(1)]?.toString() || '')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user