We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b99457e commit 16dd577Copy full SHA for 16dd577
app/javascript/controllers/path_rewriter_controller.js
@@ -10,8 +10,9 @@ export default class extends Controller {
10
return;
11
}
12
13
- Turbo.visit("/" + localStorage.getItem("defaultIndex"), {
14
- action: "replace",
15
- });
+ const action = localStorage.getItem("defaultIndex");
+ if (action) {
+ Turbo.visit(`/${action}`, { action: "replace" });
16
+ }
17
18
0 commit comments