mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Services: Use replaceNullWithEmptyString
Add the helper method replaceNullWithEmptyString to the services, where it is needed. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
4eb9f0dc11
commit
6a4e0d96cf
2 changed files with 3 additions and 3 deletions
|
@ -168,7 +168,7 @@ export class HistoryService {
|
||||||
identifier: entry.note.alias ? entry.note.alias : entry.note.id,
|
identifier: entry.note.alias ? entry.note.alias : entry.note.id,
|
||||||
lastVisited: entry.updatedAt,
|
lastVisited: entry.updatedAt,
|
||||||
tags: this.notesService.toTagList(entry.note),
|
tags: this.notesService.toTagList(entry.note),
|
||||||
title: entry.note.title,
|
title: entry.note.title ?? '',
|
||||||
pinStatus: entry.pinStatus,
|
pinStatus: entry.pinStatus,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,9 +352,9 @@ export class NotesService {
|
||||||
// TODO: Convert DB UUID to base64
|
// TODO: Convert DB UUID to base64
|
||||||
id: note.id,
|
id: note.id,
|
||||||
alias: note.alias,
|
alias: note.alias,
|
||||||
title: note.title,
|
title: note.title ?? '',
|
||||||
createTime: (await this.getFirstRevision(note)).createdAt,
|
createTime: (await this.getFirstRevision(note)).createdAt,
|
||||||
description: note.description,
|
description: note.description ?? '',
|
||||||
editedBy: note.authorColors.map(
|
editedBy: note.authorColors.map(
|
||||||
(authorColor) => authorColor.user.userName,
|
(authorColor) => authorColor.user.userName,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue