mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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) => {
|
||||
return match.path
|
||||
.replace(/(?<=:\w+)\([^)]+\)/g, '')
|
||||
.replace(/(?<=:\w+)[?+*]/g, '')
|
||||
.replace(/(:\w+)\([^)]+\)/g, '$1')
|
||||
.replace(/(:\w+)[?+*]/g, '$1')
|
||||
.replace(/:\w+/g, r => route.params[r.slice(1)]?.toString() || '')
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user