File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
packages/uui-card-media/lib Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -135,23 +135,23 @@ export class UUICardMediaElement extends UUICardElement {
135
135
demandCustomElement ( this , 'uui-symbol-file' ) ;
136
136
}
137
137
138
- private queryPreviews ( e : any ) : void {
138
+ private queryPreviews ( e : Event ) : void {
139
139
this . hasPreview =
140
- ( e . path [ 0 ] as HTMLSlotElement ) . assignedElements ( { flatten : true } )
141
- . length > 0 ;
140
+ ( e . composedPath ( ) [ 0 ] as HTMLSlotElement ) . assignedElements ( {
141
+ flatten : true ,
142
+ } ) . length > 0 ;
142
143
}
143
144
144
145
protected renderMedia ( ) {
145
- if ( this . hasPreview === false ) {
146
- if ( this . fileExt === '' ) {
147
- return html `< uui-symbol-folder id ="folder-symbol "> </ uui-symbol-folder > ` ;
148
- } else {
149
- return html `< uui-symbol-file
150
- id ="file-symbol "
151
- type ="${ this . fileExt } "> </ uui-symbol-file > ` ;
152
- }
146
+ if ( this . hasPreview === true ) return '' ;
147
+
148
+ if ( this . fileExt === '' ) {
149
+ return html `< uui-symbol-folder id ="folder-symbol "> </ uui-symbol-folder > ` ;
153
150
}
154
- return '' ;
151
+
152
+ return html `< uui-symbol-file
153
+ id ="file-symbol "
154
+ type ="${ this . fileExt } "> </ uui-symbol-file > ` ;
155
155
}
156
156
157
157
public render ( ) {
You can’t perform that action at this time.
0 commit comments