From 68d9c80338a274543d3ffbe2512218dc46480ec1 Mon Sep 17 00:00:00 2001 From: Robson Tenorio Henriques Date: Wed, 16 Oct 2024 13:19:50 -0300 Subject: [PATCH] =?UTF-8?q?Ajuste=20na=20valida=C3=A7=C3=A3o=20do=20toastE?= =?UTF-8?q?rror?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/errors/toastError.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/errors/toastError.js b/frontend/src/errors/toastError.js index 9450764f..6eb79257 100644 --- a/frontend/src/errors/toastError.js +++ b/frontend/src/errors/toastError.js @@ -2,7 +2,7 @@ import { toast } from "react-toastify"; import { i18n } from "../translate/i18n"; const toastError = err => { - const errorMsg = err.response?.data?.message || err.response.data.error; + const errorMsg = err.response?.data?.message || err.response?.data?.error; if (errorMsg) { if (i18n.exists(`backendErrors.${errorMsg}`)) { toast.error(i18n.t(`backendErrors.${errorMsg}`), {