-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid regular expression: invalid group specifier name #38
Comments
Show your router definition |
const $router = createRouter({
brands: '/brands/:value/:level2CategoryId?/:level3CategoryId?/:level4CategoryId?/:level5CategoryId?/',
promo: '/promo/:value/:level2CategoryId?/:level3CategoryId?/:level4CategoryId?/:level5CategoryId?/',
filter: [
/\/catalog\/(.*)\/(.*)\/filter\/(.*)\/apply(.*)/,
(rootCategory, level2CategoryId, smartFilterPath) => {
return {
rootCategory,
level2CategoryId,
smartFilterPath,
}
},
],
section: [
/\/catalog\/([^/]+)\/([^/]+)\/?([^/]*)\/?([^?]*)\/?([^?]*)/,
(rootCategory, level2CategoryId, level3CategoryId, level4CategoryId) => {
const clearLevel2 = level2CategoryId.replace(/\?.*/, '')
const clearLevel3 = level3CategoryId.replace(/\?.*/, '')
const clearLevel4 = level4CategoryId.replace(/\?.*/, '')
return {
rootCategory,
level2CategoryId: clearLevel2,
level3CategoryId: clearLevel3,
level4CategoryId: clearLevel4,
}
}],
actions: [
/\/(actions)\/?([^/]*)\/?([^/]*)\/?([^/]*)\/?([^?]*)\/?([^?]*)/,
(rootCategory, level2CategoryId, level3CategoryId, level4CategoryId) => {
const clearLevel2 = level2CategoryId.replace(/\?.*/, '')
const clearLevel3 = level3CategoryId.replace(/\?.*/, '')
const clearLevel4 = level4CategoryId.replace(/\?.*/, '')
return {
rootCategory,
level2CategoryId: clearLevel2,
level3CategoryId: clearLevel3,
level4CategoryId: clearLevel4,
}
}],
cart: '/cart/',
checkout: '/checkout/',
'order-completed': '/checkout/:orderId',
personal: '/my/',
favorite: '/my/favorite/',
compare: '/my/compare/',
pickpoints: '/shops/',
'pickpoints-city': '/shops/:city/',
'pickpoints-pickpoint': '/shops/:city/:id/',
delivery: '/delivery/',
'delivery-city': '/delivery/:city/',
}, { links: false, search: true }) it's not spa, only some parts of site have logic on vue |
Hm, regexp-lookbehind really fits our needs and I do not want to make code worse to support old browsers. You can achieve the same result without using RegExp by combining string-based router with What do you think about it? Or why do you think we should support Safari 14? |
I have 8 such users in a couple of hours. I don't know javascript so deeply that I can quickly rewrite the code, but in general, if not, then no |
To fix issue quickly you can downgrade |
Safari 0.15 is about 0.83 % in global market statistic (other browser in the list is just a skin for Safari, anyway it related to the browser). What is your market? Why you have so many old iOS users? |
Version 14 contains this error too. I think the fact is that we have a lot of customers from the provinces, so there is so much old hardware |
playing with the library versions didn't help, but I tweaked it a little for the option, which is not entirely true, but fits my particular case the next step is to change the code in my business logic, I think I understood how it would work in my case thnks |
Mobile Safari 14.1.2
Level: Error
Invalid regular expression: invalid group specifier name
https://caniuse.com/js-regexp-lookbehind
The text was updated successfully, but these errors were encountered: