]> Untitled Git - lemmy-ui.git/commitdiff
Fix opengraph tags. Fixes #36
authorDessalines <tyhou13@gmx.com>
Wed, 23 Sep 2020 18:46:50 +0000 (13:46 -0500)
committerDessalines <tyhou13@gmx.com>
Wed, 23 Sep 2020 18:46:50 +0000 (13:46 -0500)
src/server/index.tsx

index b7577cade269ec41bbca2cdf4575e258d42d8460..33cfe57fb99524d9034ea89fbed61d1aaba30c22 100644 (file)
@@ -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