diff --git a/packages/editor/src/dataviews/store/private-selectors.ts b/packages/editor/src/dataviews/store/private-selectors.ts index 938228ad97ed72..b2f60d7b0f33e1 100644 --- a/packages/editor/src/dataviews/store/private-selectors.ts +++ b/packages/editor/src/dataviews/store/private-selectors.ts @@ -1,8 +1,15 @@ +/** + * WordPress dependencies + */ +import type { Action } from '@wordpress/dataviews'; + /** * Internal dependencies */ import type { State } from './reducer'; +const EMPTY_ARRAY: Action< any >[] = []; + export function getEntityActions( state: State, kind: string, name: string ) { - return state.actions[ kind ]?.[ name ] ?? []; + return state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY; }