From 9e4ea80c7efafde55a77003e8317888ec49bf566 Mon Sep 17 00:00:00 2001 From: teddit Date: Fri, 10 Jun 2022 19:30:24 +0200 Subject: [PATCH] check that subreddit_about exists (sometimes it might be null and referencing to the public_description_html will throw an error --- views/subreddit.pug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/subreddit.pug b/views/subreddit.pug index 89afd18..1d889fc 100644 --- a/views/subreddit.pug +++ b/views/subreddit.pug @@ -3,7 +3,8 @@ html head title /r/#{subreddit} meta(property='og:title', content='/r/' + subreddit) - meta(property='og:description', content='' + unescape(subreddit_about.public_description_html, user_preferences)) + if subreddit_about + meta(property='og:description', content='' + unescape(subreddit_about.public_description_html, user_preferences)) include includes/meta_default.pug include includes/head.pug body(class=""+ (user_preferences.theme === 'auto' ? 'dark' : user_preferences.theme) + "")