Commit 51034e2 1 parent 6d22f8c commit 51034e2 Copy full SHA for 51034e2
File tree 1 file changed +13
-12
lines changed
AzureFunctions.AngularClient/src/app/function-integrate-v2
1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -148,18 +148,19 @@ export class FunctionIntegrateV2Component extends BaseFunctionComponent {
148
148
return ;
149
149
}
150
150
this . _functionAppService . getTemplates ( this . context )
151
- . subscribe ( ( templates : any ) => {
152
-
153
- let templateId = action . template + '-' + FunctionInfoHelper . getLanguage ( this . functionInfo ) ;
154
- let template = templates . find ( t => t . id === templateId ) ;
155
- // C# is default language. Set C# if can not found original language
156
- if ( ! template ) {
157
- templateId = action . template + '-CSharp' ;
158
- template = templates . find ( t => t . id === templateId ) ;
159
- }
160
- if ( template ) {
161
- action . templateId = templateId ;
162
- ( < FunctionsNode > this . viewInfo . node . parent . parent ) . openCreateDashboard ( DashboardType . CreateFunctionDashboard , action ) ;
151
+ . subscribe ( templates => {
152
+ if ( templates . isSuccessful ) {
153
+ let templateId = action . template + '-' + FunctionInfoHelper . getLanguage ( this . functionInfo ) ;
154
+ let template = templates . result . find ( t => t . id === templateId ) ;
155
+ // C# is default language. Set C# if can not found original language
156
+ if ( ! template ) {
157
+ templateId = action . template + '-CSharp' ;
158
+ template = templates . result . find ( t => t . id === templateId ) ;
159
+ }
160
+ if ( template ) {
161
+ action . templateId = templateId ;
162
+ ( < FunctionsNode > this . viewInfo . node . parent . parent ) . openCreateDashboard ( DashboardType . CreateFunctionDashboard , action ) ;
163
+ }
163
164
}
164
165
} ) ;
165
166
You can’t perform that action at this time.
0 commit comments