We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Ziggy v1.0 route().current() seems not to work with the root url/route (/).
route().current()
/
Console output when navigating to /
Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) at R.current (profile:27) at <anonymous>:1:9
Refers to Line 82-85 in src/js/Router.js
src/js/Router.js
v0.9 worked. Works with non-root urls/routes, e.g. route().current() on /profile returns correctly profile.edit
/profile
profile.edit
Related routes:
Route::name('dashboard.')->group(function () { Route::get('/', Dashboard\IndexController::class)->name('index'); }); Route::prefix('profile')->name('profile.')->group(function () { Route::get('/', Profile\EditController::class)->name('edit'); // ... });
Ziggy.routes:
Ziggy.routes
{ 'dashboard.index': { uri: '/', methods: ['GET', 'HEAD'] }, 'profile.edit': { uri: 'profile', methods: ['GET', 'HEAD'] }, // ... }
Ziggy call and context:
console.log(route().current());
Thank you for this great package. Let me know if I missed something!
Alex
The text was updated successfully, but these errors were encountered:
Thank you @bakerkretzmar 💪
Sorry, something went wrong.
@ajnsn thank you for the heads up! Just tagged v1.0.1 which fixes this, will be published on npm in a minute too.
v1.0.1
bakerkretzmar
Successfully merging a pull request may close this issue.
Description
Ziggy v1.0
route().current()
seems not to work with the root url/route (/
).Console output when navigating to
/
Refers to Line 82-85 in
src/js/Router.js
Expected behavior
v0.9 worked.
Works with non-root urls/routes, e.g.
route().current()
on/profile
returns correctlyprofile.edit
Environment
Related routes:
Ziggy.routes
:Ziggy call and context:
Thank you for this great package. Let me know if I missed something!
Alex
The text was updated successfully, but these errors were encountered: