diff --git a/packages/dashboard/src/pages/auth/login.js b/packages/dashboard/src/pages/auth/login.js index 047a3751..b65238e2 100644 --- a/packages/dashboard/src/pages/auth/login.js +++ b/packages/dashboard/src/pages/auth/login.js @@ -123,7 +123,7 @@ export default function Login({ flow }) { /> - {field.errors && field.errors.length > 0 && ( + {Boolean(field.errors?.length) && (
message)} />
@@ -144,7 +144,7 @@ export default function Login({ flow }) { Sign in - {flow.methods.password.config.errors.length > 0 && ( + {Boolean(flow.methods.password.config.errors?.length) && ( message)} /> )} diff --git a/packages/dashboard/src/pages/auth/registration.js b/packages/dashboard/src/pages/auth/registration.js index 4db31c50..17d64c7b 100644 --- a/packages/dashboard/src/pages/auth/registration.js +++ b/packages/dashboard/src/pages/auth/registration.js @@ -133,7 +133,7 @@ export default function Registration({ flow }) { value={formik.values[field.name]} className="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm" /> - {field.errors && field.errors.length > 0 && ( + {Boolean(field.errors?.length) && (
message)} />
@@ -149,7 +149,7 @@ export default function Registration({ flow }) { Sign up - {flow.methods.password.config.errors.length > 0 && ( + {Boolean(flow.methods.password.config.errors?.length) && ( message)} /> )}