File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ export default class Preview extends BasePreview {
241
241
242
242
events . on ( `${ this . config . name } :${ this . parent . id } :updateAfter` , ( ) => {
243
243
const dataStore = this . parent . dataStore . get ( ) as DataObject ;
244
- const imageObject = dataStore [ this . config . additional_data . uploaderConfig . dataScope ] [ 0 ] || { } ;
244
+ const imageObject = ( dataStore [ this . config . additional_data . uploaderConfig . dataScope ] as object [ ] ) [ 0 ] || { } ;
245
245
events . trigger ( `image:${ this . parent . id } :assignAfter` , imageObject ) ;
246
246
} ) ;
247
247
}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ export default class Preview extends BasePreview {
133
133
* @returns {Uploader }
134
134
*/
135
135
public getUploader ( ) {
136
- const dataStore = this . parent . dataStore . get ( ) ;
136
+ const dataStore = this . parent . dataStore . get ( ) as DataObject ;
137
137
const initialImageValue = dataStore [ this . config . additional_data . uploaderConfig . dataScope ] || "" ;
138
138
139
139
// Create uploader
@@ -142,7 +142,7 @@ export default class Preview extends BasePreview {
142
142
this . config . additional_data . uploaderConfig ,
143
143
this . parent . id ,
144
144
this . parent . dataStore ,
145
- initialImageValue ,
145
+ ( initialImageValue as object [ ] ) ,
146
146
) ;
147
147
}
148
148
@@ -284,7 +284,7 @@ export default class Preview extends BasePreview {
284
284
285
285
events . on ( `${ this . config . name } :${ this . parent . id } :updateAfter` , ( ) => {
286
286
const dataStore = this . parent . dataStore . get ( ) as DataObject ;
287
- const imageObject = dataStore [ this . config . additional_data . uploaderConfig . dataScope ] [ 0 ] || { } ;
287
+ const imageObject = ( dataStore [ this . config . additional_data . uploaderConfig . dataScope ] as object [ ] ) [ 0 ] || { } ;
288
288
events . trigger ( `image:${ this . parent . id } :assignAfter` , imageObject ) ;
289
289
} ) ;
290
290
You can’t perform that action at this time.
0 commit comments