fix(dashboard): missing null check in error extra (#27845)

This commit is contained in:
JUST.in DO IT
2024-04-02 09:20:43 -07:00
committed by GitHub
parent 8bdf457dfa
commit f25795c4e4
2 changed files with 10 additions and 3 deletions

View File

@@ -56,7 +56,14 @@ const mockedProps = {
};
test('should render', () => {
const { container } = render(<DatabaseErrorMessage {...mockedProps} />);
const nullExtraProps = {
...mockedProps,
error: {
...mockedProps.error,
extra: null,
},
};
const { container } = render(<DatabaseErrorMessage {...nullExtraProps} />);
expect(container).toBeInTheDocument();
});