add .? incase adminUserDeletion is empty

This commit is contained in:
Maidul Islam
2024-07-09 21:09:55 -04:00
parent b98c8629e5
commit 9832915eba

View File

@@ -222,7 +222,7 @@ export const superAdminServiceFactory = ({
};
const deleteUser = async (userId: string) => {
if (!licenseService.onPremFeatures.adminUserDeletion) {
if (!licenseService.onPremFeatures?.adminUserDeletion) {
throw new BadRequestError({
message: "Failed to delete user due to plan restriction. Upgrade to Infisical's Pro plan."
});