We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getEntityActions
1 parent fe8fe40 commit ee30a87Copy full SHA for ee30a87
packages/editor/src/dataviews/store/private-selectors.ts
@@ -1,8 +1,15 @@
1
+/**
2
+ * WordPress dependencies
3
+ */
4
+import type { Action } from '@wordpress/dataviews';
5
+
6
/**
7
* Internal dependencies
8
*/
9
import type { State } from './reducer';
10
11
+const EMPTY_ARRAY: Action< any >[] = [];
12
13
export function getEntityActions( state: State, kind: string, name: string ) {
- return state.actions[ kind ]?.[ name ] ?? [];
14
+ return state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY;
15
}
0 commit comments