From 8bfd7692043ee4c25fb2ee5c1f4d62dca980387b Mon Sep 17 00:00:00 2001 From: Kyle Kemp Date: Mon, 18 Sep 2023 11:58:13 -0500 Subject: [PATCH] fix(markdown): markdown renderers shouldn't try to render something that doesn't exist --- client/src/app/pages/login/login.page.ts | 2 +- client/src/app/pages/updates/updates.page.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/app/pages/login/login.page.ts b/client/src/app/pages/login/login.page.ts index 8c54b03..2bad505 100644 --- a/client/src/app/pages/login/login.page.ts +++ b/client/src/app/pages/login/login.page.ts @@ -98,7 +98,7 @@ export class LoginPage implements OnInit { renderer.link = (href, title, text) => `${text}`; - this.lastUpdate = marked(this.announcement.summary, { renderer }); + this.lastUpdate = marked(this.announcement?.summary ?? '', { renderer }); } ionViewDidEnter() { diff --git a/client/src/app/pages/updates/updates.page.ts b/client/src/app/pages/updates/updates.page.ts index 7330336..7181daa 100644 --- a/client/src/app/pages/updates/updates.page.ts +++ b/client/src/app/pages/updates/updates.page.ts @@ -30,6 +30,6 @@ export class UpdatesPage implements OnInit { renderer.link = (href, title, text) => `${text}`; - this.changelog = marked(parseString, { renderer }); + this.changelog = marked(parseString ?? '', { renderer }); } }