Skip to content

Commit

Permalink
fix: Header Actions test refactor (apache#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 May 9, 2022
1 parent 847fbe5 commit 5b0adc4
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 @@ -50,8 +50,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 5b0adc4

Please sign in to comment.