You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's the (?i:BASE64|) part of the route and I believe it is because safari doesn't support a negative look-behind. Before I discovered the offending route (as safari is such a pain to debug in), I did manage to eliminate it with an amend on atomica-software#1
Fix is easy enough for me, but this is a nasty safari only problem that could catch people out.
What exactly is the error you're getting? Does it happen everywhere in your app when Ziggy loads or only when you're making specific calls using that route? Is it something inside Ziggy in combination with your route causing this error or is it just the (?i:...) that Safari can't handle?
It blows up the entire app, the call to route().params I believe is what does it. Here is the console in Safari when I finally worked out what the issue was.
Not saying this is something that necessarily needs fixing because my route is not good and it was an easy fix, but, it took me days to debug this (mainly because Safari is a POS!).
The error was "SyntaxError: Invalid regular expression: unrecognized character after (?"
Ziggy version
2.x
Laravel version
11
Description
I'm using Laravel with Inertia and React.
It's the (?i:BASE64|) part of the route and I believe it is because safari doesn't support a negative look-behind. Before I discovered the offending route (as safari is such a pain to debug in), I did manage to eliminate it with an amend on atomica-software#1
Fix is easy enough for me, but this is a nasty safari only problem that could catch people out.
Some references:
https://stackoverflow.com/questions/51568821/works-in-chrome-but-breaks-in-safari-invalid-regular-expression-invalid-group
https://caniuse.com/js-regexp-lookbehind
Ziggy call and context
Ziggy configuration
Route definition
The text was updated successfully, but these errors were encountered: