1
1
mirror of https://github.com/primer/css.git synced 2024-11-27 17:52:45 +03:00

chore: lint

This commit is contained in:
Shawn Allen 2019-02-19 11:12:44 -08:00
parent 3da7c50383
commit 0988e6ecdf

View File

@ -31,11 +31,11 @@ export default function redirect(uri, status = 303) {
}
export function redirectTrailingSlash(context, status = 301) {
const {req, res, err} = context
const {req, res} = context
if (req.url.endsWith('/')) {
const {url} = req
const withoutSlash = url.substr(0, url.length - 1)
res.writeHead(301, {Location: withoutSlash})
res.writeHead(status, {Location: withoutSlash})
res.end()
return true
} else {