From 9401eb15ceebb75f90bdb76d085c6e386a4d44bb Mon Sep 17 00:00:00 2001 From: dariodp Date: Tue, 7 May 2024 23:25:09 +0200 Subject: [PATCH] fix(media.js): #27203 Fix image selection for media controller 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 #27203 --- assets/dev/js/editor/controls/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/dev/js/editor/controls/media.js b/assets/dev/js/editor/controls/media.js index e16003dba521..c9ab44156c80 100644 --- a/assets/dev/js/editor/controls/media.js +++ b/assets/dev/js/editor/controls/media.js @@ -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' ) ) {