Skip to content

Commit

Permalink
fix(media.js): elementor#27203 Fix image selection for media controll…
Browse files Browse the repository at this point in the history
…er inside repeater

When using a custom widget with a repeater field that contains a media controller in its items, you
can't set an image for the image field of repeater items. With this fix, the error is fixed and
image selection works again.

fix elementor#27203
  • Loading branch information
dariodp89 committed May 20, 2024
1 parent cdfcdc4 commit 9401eb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/dev/js/editor/controls/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ ControlMediaItemView = ControlMultipleBaseItemView.extend( {
id: attachment.id,
alt: attachment.alt,
source: attachment.source,
size: this.model.get( 'default' ).size,
size: this.model.get( 'default_value' ).size,
} );

if ( this.model.get( 'responsive' ) ) {
Expand Down

0 comments on commit 9401eb1

Please sign in to comment.