From ab932e31a5d0c947a10a8e6746a38d716c344543 Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Tue, 9 Jul 2024 22:55:20 +0200 Subject: [PATCH] don't ignore errors with no fields --- src/components/FormErrors.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/FormErrors.tsx b/src/components/FormErrors.tsx index f12681d..41a636d 100644 --- a/src/components/FormErrors.tsx +++ b/src/components/FormErrors.tsx @@ -4,10 +4,6 @@ import { Text, StyleSheet, View } from 'react-native'; // eslint-disable-next-line @typescript-eslint/no-explicit-any const FormErrors = ({ errors }: { errors: Record }) => { - if (!Object.keys(errors).length || !['non_field_errors', 'detail'].some((errorField) => errorField in errors)) { - return null; - } - let errorFormatted; if ('non_field_errors' in errors) { errorFormatted = errors.non_field_errors?.[0];