fix access to undefined error field

This commit is contained in:
nflnkr 2024-04-11 11:01:37 +03:00
parent e404f1ad38
commit acc7f71ac3
2 changed files with 2 additions and 2 deletions

@ -6,7 +6,7 @@ type Props = Partial<FallbackProps>;
export const ApologyPage = ({ error }: Props) => {
let message = "Что-то пошло не так";
if (error.response.data === "quiz is inactive") message = "Квиз не активирован";
if (error.response?.data === "quiz is inactive") message = "Квиз не активирован";
if (error.message === "No questions found") message = "Нет созданных вопросов";
if (error.message === "Quiz already completed") message = "Вы уже прошли этот опрос";

@ -1,6 +1,6 @@
{
"name": "@frontend/squzanswerer",
"version": "1.0.23",
"version": "1.0.25",
"type": "module",
"main": "./dist-package/index.js",
"module": "./dist-package/index.js",