Skip to content

Commit c0f59f8

Browse files
committed
fix(mat-form-field): add a check to avoid calling .split when it does not exist
1 parent 80148be commit c0f59f8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/material/form-field/form-field.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,8 @@ export class MatFormField extends _MatFormFieldMixinBase
507507
if (this._control) {
508508
let ids: string[] = [];
509509

510-
if (this._control.userAriaDescribedBy) {
510+
if (this._control.userAriaDescribedBy &&
511+
this._control.userAriaDescribedBy.split) {
511512
ids.push(...this._control.userAriaDescribedBy.split(' '));
512513
}
513514

0 commit comments

Comments
 (0)