File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export enum SqlDumpType {
1212
1313export interface SqlDumpDetails {
1414 type : SqlDumpType ;
15- sourceDb : string ;
15+ sourceDb : string | undefined ;
1616}
1717
1818export const getSqlDumpDetails = async ( filePath : string ) : Promise < SqlDumpDetails > => {
@@ -33,7 +33,7 @@ export const getSqlDumpDetails = async ( filePath: string ): Promise< SqlDumpDet
3333 } ) ;
3434
3535 let isMyDumper = false ;
36- let sourceDB = '' ;
36+ let sourceDB : string | undefined = '' ;
3737 let currentLineNumber = 0 ;
3838
3939 for await ( const line of readLine ) {
@@ -43,8 +43,8 @@ export const getSqlDumpDetails = async ( filePath: string ): Promise< SqlDumpDet
4343
4444 const metadataMatch = / ^ - - m e t a d a t a .h e a d e r / . exec ( line ) ;
4545
46- const sourceDBMatch = / ^ - - ( .* ) - s c h e m a - c r e a t e .s q l / . exec ( line ) ?? [ ] ;
47- const sourceDBName = sourceDBMatch [ 1 ] ;
46+ const sourceDBMatch = / ^ - - ( .* ) - s c h e m a - c r e a t e .s q l / . exec ( line ) ;
47+ const sourceDBName = sourceDBMatch ?. [ 1 ] ;
4848
4949 if ( metadataMatch && ! isMyDumper ) {
5050 isMyDumper = true ;
You can’t perform that action at this time.
0 commit comments