Skip to content

Commit 5634750

Browse files
committed
address sonar feedback
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 9f8a09f commit 5634750

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • src/renderer/utils/notifications/handlers

src/renderer/utils/notifications/handlers/utils.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,18 @@ type AuthorInput =
1717
export function getNotificationAuthor(
1818
users: AuthorInput[],
1919
): GitifyNotificationUser | undefined {
20-
let subjectUser: GitifyNotificationUser | undefined;
21-
2220
for (const user of users) {
2321
if (user) {
24-
subjectUser = {
22+
return {
2523
login: user.login,
2624
avatarUrl: user.avatarUrl,
2725
htmlUrl: user.htmlUrl,
2826
type: user.type,
2927
};
30-
31-
return subjectUser;
3228
}
3329
}
3430

35-
return subjectUser;
31+
return undefined;
3632
}
3733

3834
/**

0 commit comments

Comments
 (0)