File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/material/progress-spinner/testing Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,15 @@ export class MatProgressSpinnerHarness extends ComponentHarness {
4848
4949 /** Gets the progress spinner's diameter. */
5050 async getDiameter ( ) : Promise < number | null > {
51- const diameterAttr = ( await this . host ( ) ) . getAttribute ( 'data-mat-progress-spinner-diameter' ) ;
52- return ( await diameterAttr ) as ProgressSpinnerMode ;
51+ const host = await this . host ( ) ;
52+ const diameterAttr = await host . getAttribute ( 'data-mat-progress-spinner-diameter' ) ;
53+ return diameterAttr ? coerceNumberProperty ( diameterAttr ) : null ;
5354 }
5455
5556 /** Gets the progress spinner's strokeWidth. */
5657 async getStrokeWidth ( ) : Promise < number | null > {
57- const strokeWidthAttr = ( await this . host ( ) ) . getAttribute ( 'data-mat-progress-spinner-strokeWidth' ) ;
58- return ( await strokeWidthAttr ) as ProgressSpinnerMode ;
58+ const host = await this . host ( ) ;
59+ const strokeWidthAttr = await host . getAttribute ( 'data-mat-progress-spinner-strokeWidth' ) ;
60+ return strokeWidthAttr ? coerceNumberProperty ( strokeWidthAttr ) : null ;
5961 }
6062}
You can’t perform that action at this time.
0 commit comments