@@ -171,7 +171,7 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
171
171
@Input ( )
172
172
get value ( ) : any { return this . _value ; }
173
173
set value ( newValue : any ) {
174
- if ( this . _value != newValue ) {
174
+ if ( this . _value !== newValue ) {
175
175
// Set this before proceeding to ensure no circular loop occurs with selection.
176
176
this . _value = newValue ;
177
177
@@ -247,12 +247,12 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
247
247
/** Updates the `selected` radio button from the internal _value state. */
248
248
private _updateSelectedRadioFromValue ( ) : void {
249
249
// If the value already matches the selected radio, do nothing.
250
- const isAlreadySelected = this . _selected != null && this . _selected . value == this . _value ;
250
+ const isAlreadySelected = this . _selected !== null && this . _selected . value = == this . _value ;
251
251
252
- if ( this . _radios != null && ! isAlreadySelected ) {
252
+ if ( this . _radios !== null && ! isAlreadySelected ) {
253
253
this . _selected = null ;
254
254
this . _radios . forEach ( radio => {
255
- radio . checked = this . value == radio . value ;
255
+ radio . checked = this . value === radio . value ;
256
256
if ( radio . checked ) {
257
257
this . _selected = radio ;
258
258
}
@@ -374,13 +374,12 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
374
374
get checked ( ) : boolean { return this . _checked ; }
375
375
set checked ( value : boolean ) {
376
376
const newCheckedState = coerceBooleanProperty ( value ) ;
377
-
378
- if ( this . _checked != newCheckedState ) {
377
+ if ( this . _checked !== newCheckedState ) {
379
378
this . _checked = newCheckedState ;
380
-
381
- if ( newCheckedState && this . radioGroup && this . radioGroup . value != this . value ) {
379
+ if ( newCheckedState && this . radioGroup && this . radioGroup . value !== this . value ) {
382
380
this . radioGroup . selected = this ;
383
- } else if ( ! newCheckedState && this . radioGroup && this . radioGroup . value == this . value ) {
381
+ } else if ( ! newCheckedState && this . radioGroup && this . radioGroup . value === this . value ) {
382
+
384
383
// When unchecking the selected radio button, update the selected radio
385
384
// property on the group.
386
385
this . radioGroup . selected = null ;
@@ -398,12 +397,12 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
398
397
@Input ( )
399
398
get value ( ) : any { return this . _value ; }
400
399
set value ( value : any ) {
401
- if ( this . _value != value ) {
400
+ if ( this . _value !== value ) {
402
401
this . _value = value ;
403
- if ( this . radioGroup != null ) {
402
+ if ( this . radioGroup !== null ) {
404
403
if ( ! this . checked ) {
405
404
// Update checked when the value changed to match the radio group's value
406
- this . checked = this . radioGroup . value == value ;
405
+ this . checked = this . radioGroup . value === value ;
407
406
}
408
407
if ( this . checked ) {
409
408
this . radioGroup . selected = this ;
@@ -421,10 +420,10 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
421
420
get align ( ) : 'start' | 'end' {
422
421
// align refers to the checkbox relative to the label, while labelPosition refers to the
423
422
// label relative to the checkbox. As such, they are inverted.
424
- return this . labelPosition == 'after' ? 'start' : 'end' ;
423
+ return this . labelPosition === 'after' ? 'start' : 'end' ;
425
424
}
426
425
set align ( v ) {
427
- this . labelPosition = ( v == 'start' ) ? 'after' : 'before' ;
426
+ this . labelPosition = ( v === 'start' ) ? 'after' : 'before' ;
428
427
}
429
428
430
429
private _labelPosition : 'before' | 'after' ;
@@ -441,7 +440,7 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
441
440
/** Whether the radio button is disabled. */
442
441
@Input ( )
443
442
get disabled ( ) : boolean {
444
- return this . _disabled || ( this . radioGroup != null && this . radioGroup . disabled ) ;
443
+ return this . _disabled || ( this . radioGroup !== null && this . radioGroup . disabled ) ;
445
444
}
446
445
set disabled ( value : boolean ) {
447
446
this . _disabled = coerceBooleanProperty ( value ) ;
@@ -506,7 +505,7 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
506
505
507
506
this . _removeUniqueSelectionListener =
508
507
_radioDispatcher . listen ( ( id : string , name : string ) => {
509
- if ( id != this . id && name == this . name ) {
508
+ if ( id !== this . id && name = == this . name ) {
510
509
this . checked = false ;
511
510
}
512
511
} ) ;
@@ -578,7 +577,7 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
578
577
// emit its event object to the `change` output.
579
578
event . stopPropagation ( ) ;
580
579
581
- const groupValueChanged = this . radioGroup && this . value != this . radioGroup . value ;
580
+ const groupValueChanged = this . radioGroup && this . value !== this . radioGroup . value ;
582
581
this . checked = true ;
583
582
this . _emitChangeEvent ( ) ;
584
583
0 commit comments