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:
Philip Molares 2021-04-24 21:16:06 +02:00
parent 87e0ca54e1
commit 841ad8428d
2 changed files with 3 additions and 3 deletions

View file

@ -168,7 +168,7 @@ export class HistoryService {
identifier: entry.note.alias ? entry.note.alias : entry.note.id,
lastVisited: entry.updatedAt,
tags: this.notesService.toTagList(entry.note),
title: entry.note.title,
title: entry.note.title ?? '',
pinStatus: entry.pinStatus,
};
}

View file

@ -352,9 +352,9 @@ export class NotesService {
// TODO: Convert DB UUID to base64
id: note.id,
alias: note.alias,
title: note.title,
title: note.title ?? '',
createTime: (await this.getFirstRevision(note)).createdAt,
description: note.description,
description: note.description ?? '',
editedBy: note.authorColors.map(
(authorColor) => authorColor.user.userName,
),