Skip to content

Commit

Permalink
Account for undefined dynamic actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cqliu1 committed Nov 14, 2024
1 parent 53c05a3 commit 76edcee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class FlyoutEditDrilldownAction implements Action<EmbeddableApiContext> {

public async isCompatible({ embeddable }: EmbeddableApiContext) {
if (!isApiCompatible(embeddable) || getInheritedViewMode(embeddable) !== 'edit') return false;
return (embeddable.dynamicActionsState$.getValue()?.dynamicActions.events ?? []).length > 0;
return (embeddable.dynamicActionsState$.getValue()?.dynamicActions?.events ?? []).length > 0;
}

public async execute({ embeddable }: EmbeddableApiContext) {
Expand Down

0 comments on commit 76edcee

Please sign in to comment.