add .? incase adminUserDeletion is empty

This commit is contained in:
Maidul Islam
2024-07-09 21:09:55 -04:00
parent b98c8629e5
commit 9832915eba
@@ -222,7 +222,7 @@ export const superAdminServiceFactory = ({
}; };
const deleteUser = async (userId: string) => { const deleteUser = async (userId: string) => {
if (!licenseService.onPremFeatures.adminUserDeletion) { if (!licenseService.onPremFeatures?.adminUserDeletion) {
throw new BadRequestError({ throw new BadRequestError({
message: "Failed to delete user due to plan restriction. Upgrade to Infisical's Pro plan." message: "Failed to delete user due to plan restriction. Upgrade to Infisical's Pro plan."
}); });