Archived
1
0

Avoid setting ?to=/

That's the default so it's extra visual noise.
This commit is contained in:
Asher
2020-11-10 18:14:18 -06:00
parent b8340a2ae9
commit 71850e312b
3 changed files with 7 additions and 5 deletions

View File

@ -15,7 +15,8 @@ const vscode = new VscodeProvider()
router.get("/", async (req, res) => {
if (!authenticated(req)) {
return redirect(req, res, "login", {
to: req.baseUrl,
// req.baseUrl can be blank if already at the root.
to: req.baseUrl && req.baseUrl !== "/" ? req.baseUrl : undefined,
})
}