From aa29e1c7084983562966720451af36942900ea8b Mon Sep 17 00:00:00 2001 From: Deren Keskin Date: Wed, 4 May 2022 12:52:35 +0900 Subject: [PATCH] docs: fix typo on the error handling guide (#1111) --- ERROR_HANDLING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ERROR_HANDLING.md b/ERROR_HANDLING.md index 011929c79..8efc40e14 100644 --- a/ERROR_HANDLING.md +++ b/ERROR_HANDLING.md @@ -416,9 +416,9 @@ Both `.flatten()` and `.format()` accept an optional mapping function of `(issue This can be particularly useful when integrating Zod with form validation, as it allows you to pass back whatever `ZodIssue` specific context you might need. ```ts -result.error.flatten((iss: ZodIssue) => ({ - message: i.message, - errorCode: i.code, +result.error.flatten((issue: ZodIssue) => ({ + message: issue.message, + errorCode: issue.code, })); /* {