File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export class MatGoogleMapsAutocompleteComponent implements OnInit {
85
85
ngOnInit ( ) : void {
86
86
this . addressValidator . subscribe ( this . onNewPlaceResult ) ;
87
87
88
- const options : any = {
88
+ const options : AutocompleteOptions = {
89
89
// types: ['address'],
90
90
// componentRestrictions: {country: this.country},
91
91
placeIdOnly : this . placeIdOnly ,
@@ -95,9 +95,9 @@ export class MatGoogleMapsAutocompleteComponent implements OnInit {
95
95
} ;
96
96
97
97
// tslint:disable-next-line:no-unused-expression
98
- this . country ? options . push ( { componentRestrictions : { country : this . country } } ) : null ;
98
+ this . country ? options . componentRestrictions = { country : this . country } : null ;
99
99
// tslint:disable-next-line:no-unused-expression
100
- this . country ? options . push ( { types : this . types } ) : null ;
100
+ this . country ? options . types = this . types : null ;
101
101
102
102
this . autoCompleteOptions = Object . assign ( this . autoCompleteOptions , options ) ;
103
103
this . initGoogleMapsAutocomplete ( ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class MatGoogleMapsAutocompleteDirective implements OnInit {
60
60
ngOnInit ( ) : void {
61
61
if ( isPlatformBrowser ( this . platformId ) ) {
62
62
this . addressValidator . subscribe ( this . onNewPlaceResult ) ;
63
- const options : any = {
63
+ const options : AutocompleteOptions = {
64
64
// types: ['address'],
65
65
// componentRestrictions: {country: this.country},
66
66
placeIdOnly : this . placeIdOnly ,
@@ -70,9 +70,9 @@ export class MatGoogleMapsAutocompleteDirective implements OnInit {
70
70
} ;
71
71
72
72
// tslint:disable-next-line:no-unused-expression
73
- this . country ? options . push ( { componentRestrictions : { country : this . country } } ) : null ;
73
+ this . country ? options . componentRestrictions = { country : this . country } : null ;
74
74
// tslint:disable-next-line:no-unused-expression
75
- this . country ? options . push ( { types : this . types } ) : null ;
75
+ this . country ? options . types = this . types : null ;
76
76
77
77
this . autoCompleteOptions = Object . assign ( this . autoCompleteOptions , options ) ;
78
78
this . initGoogleMapsAutocomplete ( ) ;
You can’t perform that action at this time.
0 commit comments