summaryrefslogtreecommitdiff
path: root/src/web/server.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-21 13:20:32 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-21 13:20:32 +0900
commit21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76 (patch)
tree80e05e203aa68997b0ef2571618c9e13d3e3d0da /src/web/server.ts
parentwip (diff)
downloadsharkey-21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76.tar.gz
sharkey-21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76.tar.bz2
sharkey-21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76.zip
[Server] Fix bug
Diffstat (limited to 'src/web/server.ts')
-rw-r--r--src/web/server.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/web/server.ts b/src/web/server.ts
index 9c44807f94..a1b7130baf 100644
--- a/src/web/server.ts
+++ b/src/web/server.ts
@@ -29,7 +29,7 @@ app.use(compression());
app.use((req, res, next) => {
res.header('X-Frame-Options', 'DENY');
- res.locals.user = (req.headers['cookie'].match(/i=(!\w+)/) || [null, null])[1];
+ res.locals.user = ((req.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
next();
});