Skip to content

Commit

Permalink
Fix NPE for non-vis embeddables on dashboards (#682)
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
  • Loading branch information
lezzago authored Aug 10, 2023
1 parent 5025ae3 commit 8fcf14c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion public/actions/alerting_dashboard_action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,13 @@ export const createAlertingAction = ({
getIconType: () => icon,
type,
grouping,
// Do not show actions for certin visualizations
// Do not show actions for certain visualizations
isCompatible: async ({ embeddable }: ActionContext) => {
return Boolean(
embeddable.parent &&
embeddable.getInput()?.viewMode === 'view' &&
isDashboard(embeddable.parent) &&
embeddable.vis &&
isEligibleForVisLayers(embeddable.vis, getUISettings())
);
},
Expand Down

0 comments on commit 8fcf14c

Please sign in to comment.