From 2c0180f32367476d5d5036c5653bbf514606b799 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Tue, 7 Jun 2022 14:57:23 +0800 Subject: [PATCH] Fix: Fix error when status page desc. is null --- 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 4413e665..5bb82333 100644 --- a/server/model/status_page.js +++ b/server/model/status_page.js @@ -36,7 +36,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);