Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 8a6b0e6

Browse files
committed
Merge branch 'master' into dev
2 parents e4a7731 + d9a2a4b commit 8a6b0e6

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

AzureFunctions.AngularClient/src/app/function-new/function-new.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ <h3>{{ 'functionNew_nameYourFunction' | translate }}</h3>
6868
(remove)="onRemoveBinding($event)"
6969
(update)="onUpdateBinding($event)"></binding>
7070

71-
<div *ngIf="model.trigger.type === 'eventGridTrigger'" class="alert alert-warning alert-dismissible" role="alert">
71+
<div *ngIf="model.trigger && model.trigger.type === 'eventGridTrigger'" class="alert alert-warning alert-dismissible" role="alert">
7272
{{ 'eventGrid_createMessage' | translate }}
7373
</div>
7474

AzureFunctions.AngularClient/src/app/template-picker/template-picker.component.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -261,17 +261,19 @@ export class TemplatePickerComponent {
261261
this.selectedTemplate = template;
262262

263263
// Some bindings (and templates that use them) require an AAD app; if so, show express button
264-
let binding = this.bindings.find((b) => {
265-
return b.type.toString() === this.selectedTemplate;
266-
});
267-
if (binding) {
268-
this.showAADExpressRegistration = !!binding.AADPermissions;
269-
} else {
270-
// Could be improved by determining which bindings a template uses automatically
271-
let templateObject = this.templates.find((t) => {
272-
return t.value === template;
264+
if (this.bindings) {
265+
let binding = this.bindings.find((b) => {
266+
return b.type.toString() === this.selectedTemplate;
273267
});
274-
this.showAADExpressRegistration = templateObject && !!templateObject.AADPermissions;
268+
if (binding) {
269+
this.showAADExpressRegistration = !!binding.AADPermissions;
270+
} else {
271+
// Could be improved by determining which bindings a template uses automatically
272+
let templateObject = this.templates.find((t) => {
273+
return t.value === template;
274+
});
275+
this.showAADExpressRegistration = templateObject && !!templateObject.AADPermissions;
276+
}
275277
}
276278

277279
if (!this.showFooter) {

0 commit comments

Comments
 (0)