Skip to content

Commit 423c734

Browse files
committed
Fix remaining Angular 22 upgrade errors
Gives `SpotFormBindingDirective` an explicit constructor, as Angular 22 rejects constructor inheritance from the undecorated `NgControl` base class (NG2006). Coerces `hidden` to a boolean in the OpenID Connect providers controller, as TypeScript 6.0's DOM types widen the getter to include string values.
1 parent d2d81b0 commit 423c734

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

frontend/src/app/spot/components/form-field/form-binding.directive.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export const formControlBinding = {
1717
export class SpotFormBindingDirective extends NgControl {
1818
@Input('spotFormBinding') form!:UntypedFormControl|UntypedFormGroup|UntypedFormArray;
1919

20+
constructor() {
21+
super();
22+
}
23+
2024
get control():UntypedFormControl|UntypedFormGroup|UntypedFormArray {
2125
return this.form;
2226
}

frontend/src/stimulus/controllers/dynamic/admin/openid-connect-providers.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ export default class OpenidConnectProvidersController extends Controller {
1313
this
1414
.azureFormTarget
1515
.querySelectorAll('input')
16-
.forEach((el) => (el.disabled = this.azureFormTarget.hidden));
16+
.forEach((el) => (el.disabled = this.azureFormTarget.hidden === true));
1717
}
1818
}

0 commit comments

Comments
 (0)