Skip to content

Commit 16dd577

Browse files
committed
Fix rewriter bug
1 parent b99457e commit 16dd577

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/javascript/controllers/path_rewriter_controller.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ export default class extends Controller {
1010
return;
1111
}
1212

13-
Turbo.visit("/" + localStorage.getItem("defaultIndex"), {
14-
action: "replace",
15-
});
13+
const action = localStorage.getItem("defaultIndex");
14+
if (action) {
15+
Turbo.visit(`/${action}`, { action: "replace" });
16+
}
1617
}
1718
}

0 commit comments

Comments
 (0)