CYS: Hide shuffle button when only one pattern is available (#49790)
* CYS: Hide shuffle button when only one pattern is available * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
7f390a3663
commit
859fd9f001
|
@ -106,7 +106,8 @@ export default function Shuffle( { clientId }: { clientId: string } ) {
|
||||||
// @ts-expect-error missing type
|
// @ts-expect-error missing type
|
||||||
const { replaceBlocks } = useDispatch( blockEditorStore );
|
const { replaceBlocks } = useDispatch( blockEditorStore );
|
||||||
|
|
||||||
if ( patterns.length === 0 ) {
|
// We need at least two patterns to shuffle.
|
||||||
|
if ( patterns.length < 2 ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
CYS: Hide shuffle button when only one pattern is available
|
Loading…
Reference in New Issue