Skip to content

Commit

Permalink
fix(markdown): markdown renderers shouldn't try to render something t…
Browse files Browse the repository at this point in the history
…hat doesn't exist
  • Loading branch information
seiyria committed Sep 18, 2023
1 parent 435c3c3 commit 8bfd769
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/app/pages/login/login.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class LoginPage implements OnInit {
renderer.link = (href, title, text) =>
`<a href="${href}" title="${title}" target="_blank" rel="noopener noreferrer">${text}</a>`;

this.lastUpdate = marked(this.announcement.summary, { renderer });
this.lastUpdate = marked(this.announcement?.summary ?? '', { renderer });
}

ionViewDidEnter() {
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/pages/updates/updates.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export class UpdatesPage implements OnInit {
renderer.link = (href, title, text) =>
`<a href="${href}" title="${title}" target="_blank" rel="noopener noreferrer">${text}</a>`;

this.changelog = marked(parseString, { renderer });
this.changelog = marked(parseString ?? '', { renderer });
}
}

0 comments on commit 8bfd769

Please sign in to comment.