feat: remove nullables

This commit is contained in:
Zamitto
2024-07-17 19:03:32 -03:00
parent 8c67dda84e
commit 929be48495
6 changed files with 13 additions and 13 deletions

View File

@@ -4,8 +4,8 @@ import { FriendRequest } from "@types";
const getFriendRequests = async (
_event: Electron.IpcMainInvokeEvent
): Promise<FriendRequest[] | null> => {
return HydraApi.get(`/profile/friend-requests`).catch(() => null);
): Promise<FriendRequest[]> => {
return HydraApi.get(`/profile/friend-requests`).catch(() => []);
};
registerEvent("getFriendRequests", getFriendRequests);