tighten / ziggy

Use your Laravel routes in JavaScript.
MIT License
3.91k stars 248 forks source link

Issue Using Fallback Not Working On Older Browsers #546

Closed nishpatel closed 2 years ago

nishpatel commented 2 years ago

Ziggy version

v1.4.5

Laravel version

v8.83.6

Description

Upgraded from v1.4.2 to v1.4.5 and our fallback routes have been broken on older browsers. An example is Chrome 80 version. There may be more but this is what we have found with windows users.

We receive the following error:

Screenshot 2022-04-01 at 2 41 15 PM

Testing versions think the suspect is 1.4.4 release.

Ziggy call and context

route('catalog', { 'fallbackPlaceholder': 'mens/blazers' })

Ziggy configuration

catalog:
methods: (2) ['GET', 'HEAD']
uri: "{store?}/{fallbackPlaceholder}"
wheres: {fallbackPlaceholder: '.*'}

Route definition

Route::get('/category/{uid}/{?data}', [CategoryController::class, 'view'])->name('category');
Route::fallback([ContentController::class, 'view'])->middleware(['cacheable', 'catalog.routing'])->name('catalog');