Skip to content

Commit

Permalink
Fix: Restrict export pattern action to user patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Jul 8, 2024
1 parent 37ddb07 commit ec222ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/editor/src/dataviews/actions/export-pattern.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const exportPattern: Action< Pattern > = {
id: 'export-pattern',
label: __( 'Export as JSON' ),
supportsBulk: true,
isEligible: ( item ) => {
return item.type === 'wp_block';
},
callback: async ( items ) => {
if ( items.length === 1 ) {
return downloadBlob(
Expand Down

0 comments on commit ec222ca

Please sign in to comment.