Specify args for wp.data resolution in marketing page to support WP 5.9 (#37198)
This commit is contained in:
commit
98dcb9bea4
|
@ -40,7 +40,7 @@ export const useRecommendedChannels = (): UseRecommendedChannels => {
|
|||
} );
|
||||
|
||||
return {
|
||||
loading: ! hasFinishedResolution( 'getRecommendedChannels' ),
|
||||
loading: ! hasFinishedResolution( 'getRecommendedChannels', [] ),
|
||||
data: nonActiveRecommendedChannels,
|
||||
error,
|
||||
};
|
||||
|
|
|
@ -63,7 +63,7 @@ export const useRegisteredChannels = (): UseRegisteredChannels => {
|
|||
const { invalidateResolution } = useDispatch( STORE_KEY );
|
||||
|
||||
const refetch = useCallback( () => {
|
||||
invalidateResolution( 'getRegisteredChannels' );
|
||||
invalidateResolution( 'getRegisteredChannels', [] );
|
||||
}, [ invalidateResolution ] );
|
||||
|
||||
return useSelect( ( select ) => {
|
||||
|
@ -72,7 +72,7 @@ export const useRegisteredChannels = (): UseRegisteredChannels => {
|
|||
const state = getRegisteredChannels< RegisteredChannelsState >();
|
||||
|
||||
return {
|
||||
loading: ! hasFinishedResolution( 'getRegisteredChannels' ),
|
||||
loading: ! hasFinishedResolution( 'getRegisteredChannels', [] ),
|
||||
data: state.data?.map( convert ),
|
||||
error: state.error,
|
||||
refetch,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix WP data resolution (`invalidateResolution`) not working with WP 5.9 in marketing page.
|
Loading…
Reference in New Issue