Skip to content

Commit

Permalink
Fix missed compatibility check
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Sep 25, 2024
1 parent 445ec58 commit 68fa370
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
type HasParentApi,
type HasUniqueId,
} from '@kbn/presentation-publishing';
import { getDashboardCapabilities } from '../utils/get_dashboard_capabilities';

export type ExpandPanelActionApi = HasUniqueId & HasParentApi<CanExpandPanels>;

Expand All @@ -24,6 +25,6 @@ export const compatibilityCheck = (api: unknown): api is ExpandPanelActionApi =>
export function isCompatible(api: unknown) {
if (!compatibilityCheck(api)) return false;
const { createNew: canCreateNew, showWriteControls: canEditExisting } =
dashboardCapabilitiesService.dashboardCapabilities;
getDashboardCapabilities();
return Boolean(canCreateNew || canEditExisting);
}

0 comments on commit 68fa370

Please sign in to comment.