File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/ui/src/elements/Thumbnail Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,16 @@ export function ThumbnailComponent(props: ThumbnailComponentProps) {
92
92
}
93
93
} , [ fileSrc ] )
94
94
95
+ let src : string = ''
96
+
95
97
/**
96
98
* If an imageCacheTag is provided, append it to the fileSrc
97
99
* Check if the fileSrc already has a query string, if it does, append the imageCacheTag with an ampersand
98
100
*/
99
- const queryChar = fileSrc . includes ( '?' ) ? '&' : '?'
100
- const src = imageCacheTag ? `${ fileSrc } ${ queryChar } ${ imageCacheTag } ` : fileSrc
101
+ if ( fileSrc ) {
102
+ const queryChar = fileSrc ?. includes ( '?' ) ? '&' : '?'
103
+ src = imageCacheTag ? `${ fileSrc } ${ queryChar } ${ imageCacheTag } ` : fileSrc
104
+ }
101
105
102
106
return (
103
107
< div className = { classNames } >
You can’t perform that action at this time.
0 commit comments