File tree Expand file tree Collapse file tree 2 files changed +16
-18
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web Expand file tree Collapse file tree 2 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,17 @@ export default class Preview extends BasePreview {
140
140
* @returns {Uploader }
141
141
*/
142
142
public getUploader ( ) {
143
+ const dataStore = this . parent . dataStore . get ( ) as any [ ] ;
144
+ const initialImageValue = dataStore [ this . config . additional_data . uploaderConfig . dataScope ] || "" ;
145
+
146
+ // Create uploader
147
+ this . uploader = new Uploader (
148
+ "imageuploader_" + this . parent . id ,
149
+ this . config . additional_data . uploaderConfig ,
150
+ this . parent . id ,
151
+ this . parent . dataStore ,
152
+ initialImageValue ,
153
+ ) ;
143
154
return this . uploader ;
144
155
}
145
156
@@ -251,18 +262,6 @@ export default class Preview extends BasePreview {
251
262
252
263
events . on ( `${ this . config . name } :mountAfter` , ( args : ContentTypeMountEventParamsInterface ) => {
253
264
if ( args . id === this . parent . id ) {
254
- const dataStore = this . parent . dataStore . get ( ) ;
255
- const initialImageValue = dataStore [ this . config . additional_data . uploaderConfig . dataScope ] || "" ;
256
-
257
- // Create uploader
258
- this . uploader = new Uploader (
259
- "imageuploader_" + this . parent . id ,
260
- this . config . additional_data . uploaderConfig ,
261
- this . parent . id ,
262
- this . parent . dataStore ,
263
- initialImageValue ,
264
- ) ;
265
-
266
265
// Update the display label for the slide
267
266
const slider = this . parent . parent ;
268
267
this . displayLabel ( $t ( `Slide ${ slider . children ( ) . indexOf ( this . parent ) + 1 } ` ) ) ;
You can’t perform that action at this time.
0 commit comments