From 4042c263907b20aa9d4b9dd2c584f1ff740061ce Mon Sep 17 00:00:00 2001 From: Dafnik Date: Mon, 14 Nov 2022 18:05:48 +0100 Subject: [PATCH] Fix 'undefined' in link preview generation --- server/model/status_page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/model/status_page.js b/server/model/status_page.js index 4e7b38cf..fbbff391 100644 --- a/server/model/status_page.js +++ b/server/model/status_page.js @@ -38,7 +38,7 @@ class StatusPage extends BeanModel { */ static async renderHTML(indexHTML, statusPage) { const $ = cheerio.load(indexHTML); - const description155 = statusPage.description?.substring(0, 155); + const description155 = statusPage.description?.substring(0, 155) ?? ""; $("title").text(statusPage.title); $("meta[name=description]").attr("content", description155);