mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-25 02:46:05 +03:00
Fix 'undefined' in link preview generation
This commit is contained in:
parent
a17084f75d
commit
4042c26390
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue