File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -81,20 +81,20 @@ export default class FirebaseStorageAdapter extends BaseAdapter {
8181 }
8282 const filePath = this . getTargetDir ( this . basePath ) ;
8383 const rs = this . bucket . file ( filePath ) . createReadStream ( ) ;
84- let contents : unknown = null ;
84+ let fileContent : Buffer ;
8585 return new Promise ( function ( resolve , reject ) {
8686 rs . on ( 'error' , function ( err ) {
8787 return reject ( err ) ;
8888 } ) ;
8989 rs . on ( 'data' , function ( data ) {
90- if ( contents ) {
91- contents = data ;
90+ if ( fileContent ) {
91+ fileContent = data ;
9292 } else {
93- contents = Buffer . concat ( [ contents , data ] ) ;
93+ fileContent = Buffer . concat ( [ fileContent , data ] ) ;
9494 }
9595 } ) ;
9696 rs . on ( 'end' , function ( ) {
97- return resolve ( contents as any ) ;
97+ return resolve ( fileContent ) ;
9898 } ) ;
9999 } ) ;
100100 }
You can’t perform that action at this time.
0 commit comments