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 {
49
49
await Promise . all (
50
50
uploads . map ( async ( u ) => {
51
51
52
- const fileNameBits = u . rawFile instanceof File ? u . rawFile . name . split ( '.' ) ?? null : null ;
52
+ const fileNameBits = u . rawFile instanceof File ? u . rawFile . name . split ( '.' ) : [ ] ;
53
53
54
- const extension = fileNameBits === null || fileNameBits . length === 0 ? '' : '.' + fileNameBits . pop ( ) ;
54
+ const fileExtension = ! fileNameBits ? .length ? '' : '.' + fileNameBits . pop ( ) ;
55
55
56
56
const link = await this . uploadAndGetLink (
57
57
u . rawFile ,
58
58
docPath ,
59
- u . fieldSlashesPath + extension ,
59
+ u . fieldSlashesPath + fileExtension ,
60
60
! ! this . options . useFileNamesInStorage
61
61
) ;
62
62
set ( data , u . fieldDotsPath + ".src" , link ) ;
You can’t perform that action at this time.
0 commit comments