Skip to content

Commit

Permalink
fix: Header Actions test refactor (#16336)
Browse files Browse the repository at this point in the history
* fixed tests

* Update index.tsx

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
  • Loading branch information
AAfghahi and eschutho committed Nov 24, 2021
1 parent eee7b51 commit 7ee4117
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export default function HeaderReportActionsDropDown({
any,
UserWithPermissionsAndRoles
>(state => state.user || state.explore?.user);
const reportsIds = Object.keys(reports);
const report: AlertObject = reports[reportsIds[0]];
const reportsIds = Object.keys(reports || []);
const report: AlertObject = reports?.[reportsIds[0]];
const [
currentReportDeleting,
setCurrentReportDeleting,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const createProps = () => ({
dashboardTitle: 'Dashboard Title',
charts: {},
layout: {},
reports: {},
expandedSlices: {},
css: '',
customCss: '',
Expand Down

0 comments on commit 7ee4117

Please sign in to comment.