diff --git a/src/server/index.tsx b/src/server/index.tsx index b7577cad..33cfe57f 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -43,7 +43,9 @@ server.get('/*', async (req, res) => { let site: GetSiteResponse = resolver[0]; let routeData = resolver.slice(1, resolver.length); - let acceptLang = req.headers['accept-language'].split(',')[0]; + let acceptLang = req.headers['accept-language'] + ? req.headers['accept-language'].split(',')[0] + : 'en'; let lang = !!site.my_user ? site.my_user.lang == 'browser' ? acceptLang