File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export function generateFirebaseJson(
70
70
} else if ( Array . isArray ( firebaseJson . hosting ) ) {
71
71
firebaseJson . hosting . push ( newConfig ) ;
72
72
} else {
73
- firebaseJson . hosting = [ firebaseJson . hosting ! , newConfig ] ;
73
+ firebaseJson . hosting = [ firebaseJson . hosting , newConfig ] ;
74
74
}
75
75
76
76
firebaseJson . functions = generateFunctionsConfig ( dist ) ;
Original file line number Diff line number Diff line change @@ -71,11 +71,12 @@ export function getFirebaseProjectName(
71
71
workspaceRoot : string ,
72
72
target : string
73
73
) : string | undefined {
74
- const { targets } : FirebaseRc = JSON . parse (
74
+ const rc : FirebaseRc = JSON . parse (
75
75
readFileSync ( join ( workspaceRoot , '.firebaserc' ) , 'UTF-8' )
76
76
) ;
77
- const projects = Object . keys ( targets ! ) ;
77
+ const targets = rc . targets || { } ;
78
+ const projects = Object . keys ( targets || { } ) ;
78
79
return projects . find (
79
- project => ! ! Object . keys ( targets ! [ project ] . hosting ) . find ( t => t === target )
80
+ project => ! ! Object . keys ( targets [ project ] . hosting ) . find ( t => t === target )
80
81
) ;
81
82
}
You can’t perform that action at this time.
0 commit comments