From 4e9270ab8eb6a2e41fa2f4d01e29bfc14a6e165b Mon Sep 17 00:00:00 2001 From: Dima Alipov Date: Sat, 16 Mar 2024 18:57:48 +0200 Subject: [PATCH] fix: "An unexpected error occurred" after second opening any grade --- src/components/GradesView/EditModal/OverrideTable/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/GradesView/EditModal/OverrideTable/hooks.js b/src/components/GradesView/EditModal/OverrideTable/hooks.js index d4dfc14c..d8711f80 100644 --- a/src/components/GradesView/EditModal/OverrideTable/hooks.js +++ b/src/components/GradesView/EditModal/OverrideTable/hooks.js @@ -9,7 +9,7 @@ const useOverrideTableData = () => { const { formatMessage } = useIntl(); const hide = selectors.grades.useHasOverrideErrors(); - const gradeOverrides = selectors.grades.useGradeData().gradeOverrideHistoryResults; + const gradeOverrides = selectors.grades.useGradeData().gradeOverrideHistoryResults || []; const tableProps = {}; if (!hide) { tableProps.columns = [