feat(admin): handle empty member list in trusted origins retrieval

- Added a check to return an empty array if no members are found, improving the robustness of the `getTrustedOrigins` function.
This commit is contained in:
Mauricio Siu
2026-02-05 01:13:25 -06:00
parent 99646f887b
commit bde192c1e7

View File

@@ -125,6 +125,10 @@ export const getTrustedOrigins = async () => {
},
});
if (members.length === 0) {
return [];
}
const trustedOrigins = members.flatMap(
(member) => member.user.trustedOrigins || [],
);