File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,14 @@ export class FireClient {
4949 await Promise . all (
5050 uploads . map ( async ( u ) => {
5151
52- const fileNameBits = u . rawFile instanceof File ? u . rawFile . name . split ( '.' ) ?? null : null ;
52+ const fileNameBits = u . rawFile instanceof File ? u . rawFile . name . split ( '.' ) : [ ] ;
5353
54- const extension = fileNameBits === null || fileNameBits . length === 0 ? '' : '.' + fileNameBits . pop ( ) ;
54+ const fileExtension = ! fileNameBits ? .length ? '' : '.' + fileNameBits . pop ( ) ;
5555
5656 const link = await this . uploadAndGetLink (
5757 u . rawFile ,
5858 docPath ,
59- u . fieldSlashesPath + extension ,
59+ u . fieldSlashesPath + fileExtension ,
6060 ! ! this . options . useFileNamesInStorage
6161 ) ;
6262 set ( data , u . fieldDotsPath + ".src" , link ) ;
You can’t perform that action at this time.
0 commit comments