77 */
88
99import { _IdGenerator , FocusMonitor } from '@angular/cdk/a11y' ;
10+ import { Direction , Directionality } from '@angular/cdk/bidi' ;
1011import { SelectionModel } from '@angular/cdk/collections' ;
11- import { DOWN_ARROW , LEFT_ARROW , RIGHT_ARROW , UP_ARROW , SPACE , ENTER } from '@angular/cdk/keycodes' ;
12+ import { DOWN_ARROW , ENTER , LEFT_ARROW , RIGHT_ARROW , SPACE , UP_ARROW } from '@angular/cdk/keycodes' ;
13+ import { _CdkPrivateStyleLoader } from '@angular/cdk/private' ;
1214import {
1315 AfterContentInit ,
16+ AfterViewInit ,
17+ ANIMATION_MODULE_TYPE ,
18+ booleanAttribute ,
1419 ChangeDetectionStrategy ,
1520 ChangeDetectorRef ,
1621 Component ,
@@ -19,24 +24,19 @@ import {
1924 ElementRef ,
2025 EventEmitter ,
2126 forwardRef ,
27+ HostAttributeToken ,
28+ inject ,
29+ InjectionToken ,
2230 Input ,
2331 OnDestroy ,
2432 OnInit ,
2533 Output ,
2634 QueryList ,
2735 ViewChild ,
2836 ViewEncapsulation ,
29- InjectionToken ,
30- AfterViewInit ,
31- booleanAttribute ,
32- inject ,
33- HostAttributeToken ,
34- ANIMATION_MODULE_TYPE ,
3537} from '@angular/core' ;
36- import { Direction , Directionality } from '@angular/cdk/bidi' ;
3738import { ControlValueAccessor , NG_VALUE_ACCESSOR } from '@angular/forms' ;
38- import { MatRipple , MatPseudoCheckbox , _StructuralStylesLoader } from '@angular/material/core' ;
39- import { _CdkPrivateStyleLoader } from '@angular/cdk/private' ;
39+ import { _StructuralStylesLoader , MatPseudoCheckbox , MatRipple } from '@angular/material/core' ;
4040
4141/**
4242 * @deprecated No longer used.
@@ -513,7 +513,7 @@ export class MatButtonToggleGroup implements ControlValueAccessor, OnInit, After
513513 /** Selects a value if there's a toggle that corresponds to it. */
514514 private _selectValue ( value : any , toggles : MatButtonToggle [ ] ) {
515515 for ( const toggle of toggles ) {
516- if ( toggle . value != null && toggle . value === value ) {
516+ if ( toggle . value === value ) {
517517 toggle . checked = true ;
518518 this . _selectionModel . select ( toggle ) ;
519519 if ( ! this . multiple ) {
0 commit comments