mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-23 01:12:37 +00:00
GroupsService: Remove null from toGroupDto return type
toGroupDto won't return null, as TS's strict mode prevents group from being nullish Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
664a64495f
commit
b3e01fff7f
1 changed files with 1 additions and 5 deletions
|
@ -43,11 +43,7 @@ export class GroupsService {
|
|||
* @param {Group} group - the group to use
|
||||
* @return {GroupInfoDto} the built GroupInfoDto
|
||||
*/
|
||||
toGroupDto(group: Group | null | undefined): GroupInfoDto | null {
|
||||
if (!group) {
|
||||
this.logger.warn(`Recieved ${String(group)} argument!`, 'toGroupDto');
|
||||
return null;
|
||||
}
|
||||
toGroupDto(group: Group): GroupInfoDto {
|
||||
return {
|
||||
name: group.name,
|
||||
displayName: group.displayName,
|
||||
|
|
Loading…
Reference in a new issue