mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-02 13:33:21 +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
|
* @param {Group} group - the group to use
|
||||||
* @return {GroupInfoDto} the built GroupInfoDto
|
* @return {GroupInfoDto} the built GroupInfoDto
|
||||||
*/
|
*/
|
||||||
toGroupDto(group: Group | null | undefined): GroupInfoDto | null {
|
toGroupDto(group: Group): GroupInfoDto {
|
||||||
if (!group) {
|
|
||||||
this.logger.warn(`Recieved ${String(group)} argument!`, 'toGroupDto');
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
name: group.name,
|
name: group.name,
|
||||||
displayName: group.displayName,
|
displayName: group.displayName,
|
||||||
|
|
Loading…
Reference in a new issue