1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 19:53:11 +03:00

chore: lint

This commit is contained in:
Shawn Allen 2019-02-19 11:39:42 -08:00
parent 5bed0029d5
commit ed34ad1d3f

View File

@ -30,7 +30,10 @@ export default function redirect(uri, status = 303) {
}
export function redirectTrailingSlash(context, status = 301) {
const {req: {url}, res} = context
const {
req: {url},
res
} = context
if (url.endsWith('/')) {
const withoutSlash = url.substr(0, url.length - 1)
res.writeHead(status, {Location: withoutSlash})