@@ -155,7 +155,7 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
155
155
@Input ( )
156
156
get value ( ) : any { return this . _value ; }
157
157
set value ( newValue : any ) {
158
- if ( this . _value != newValue ) {
158
+ if ( this . _value !== newValue ) {
159
159
// Set this before proceeding to ensure no circular loop occurs with selection.
160
160
this . _value = newValue ;
161
161
@@ -231,12 +231,12 @@ export class MatRadioGroup extends _MatRadioGroupMixinBase
231
231
/** Updates the `selected` radio button from the internal _value state. */
232
232
private _updateSelectedRadioFromValue ( ) : void {
233
233
// If the value already matches the selected radio, do nothing.
234
- const isAlreadySelected = this . _selected != null && this . _selected . value == this . _value ;
234
+ const isAlreadySelected = this . _selected !== null && this . _selected . value = == this . _value ;
235
235
236
- if ( this . _radios != null && ! isAlreadySelected ) {
236
+ if ( this . _radios && ! isAlreadySelected ) {
237
237
this . _selected = null ;
238
238
this . _radios . forEach ( radio => {
239
- radio . checked = this . value == radio . value ;
239
+ radio . checked = this . value === radio . value ;
240
240
if ( radio . checked ) {
241
241
this . _selected = radio ;
242
242
}
@@ -357,13 +357,12 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
357
357
get checked ( ) : boolean { return this . _checked ; }
358
358
set checked ( value : boolean ) {
359
359
const newCheckedState = coerceBooleanProperty ( value ) ;
360
-
361
- if ( this . _checked != newCheckedState ) {
360
+ if ( this . _checked !== newCheckedState ) {
362
361
this . _checked = newCheckedState ;
363
-
364
- if ( newCheckedState && this . radioGroup && this . radioGroup . value != this . value ) {
362
+ if ( newCheckedState && this . radioGroup && this . radioGroup . value !== this . value ) {
365
363
this . radioGroup . selected = this ;
366
- } else if ( ! newCheckedState && this . radioGroup && this . radioGroup . value == this . value ) {
364
+ } else if ( ! newCheckedState && this . radioGroup && this . radioGroup . value === this . value ) {
365
+
367
366
// When unchecking the selected radio button, update the selected radio
368
367
// property on the group.
369
368
this . radioGroup . selected = null ;
@@ -381,12 +380,12 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
381
380
@Input ( )
382
381
get value ( ) : any { return this . _value ; }
383
382
set value ( value : any ) {
384
- if ( this . _value != value ) {
383
+ if ( this . _value !== value ) {
385
384
this . _value = value ;
386
- if ( this . radioGroup != null ) {
385
+ if ( this . radioGroup !== null ) {
387
386
if ( ! this . checked ) {
388
387
// Update checked when the value changed to match the radio group's value
389
- this . checked = this . radioGroup . value == value ;
388
+ this . checked = this . radioGroup . value === value ;
390
389
}
391
390
if ( this . checked ) {
392
391
this . radioGroup . selected = this ;
@@ -408,7 +407,7 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
408
407
/** Whether the radio button is disabled. */
409
408
@Input ( )
410
409
get disabled ( ) : boolean {
411
- return this . _disabled || ( this . radioGroup != null && this . radioGroup . disabled ) ;
410
+ return this . _disabled || ( this . radioGroup !== null && this . radioGroup . disabled ) ;
412
411
}
413
412
set disabled ( value : boolean ) {
414
413
this . _disabled = coerceBooleanProperty ( value ) ;
@@ -473,7 +472,7 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
473
472
474
473
this . _removeUniqueSelectionListener =
475
474
_radioDispatcher . listen ( ( id : string , name : string ) => {
476
- if ( id != this . id && name == this . name ) {
475
+ if ( id !== this . id && name = == this . name ) {
477
476
this . checked = false ;
478
477
}
479
478
} ) ;
@@ -545,7 +544,7 @@ export class MatRadioButton extends _MatRadioButtonMixinBase
545
544
// emit its event object to the `change` output.
546
545
event . stopPropagation ( ) ;
547
546
548
- const groupValueChanged = this . radioGroup && this . value != this . radioGroup . value ;
547
+ const groupValueChanged = this . radioGroup && this . value !== this . radioGroup . value ;
549
548
this . checked = true ;
550
549
this . _emitChangeEvent ( ) ;
551
550
0 commit comments