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 {
8585 ngOnInit ( ) : void {
8686 this . addressValidator . subscribe ( this . onNewPlaceResult ) ;
8787
88- const options : any = {
88+ const options : AutocompleteOptions = {
8989 // types: ['address'],
9090 // componentRestrictions: {country: this.country},
9191 placeIdOnly : this . placeIdOnly ,
@@ -95,9 +95,9 @@ export class MatGoogleMapsAutocompleteComponent implements OnInit {
9595 } ;
9696
9797 // 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 ;
9999 // tslint:disable-next-line:no-unused-expression
100- this . country ? options . push ( { types : this . types } ) : null ;
100+ this . country ? options . types = this . types : null ;
101101
102102 this . autoCompleteOptions = Object . assign ( this . autoCompleteOptions , options ) ;
103103 this . initGoogleMapsAutocomplete ( ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class MatGoogleMapsAutocompleteDirective implements OnInit {
6060 ngOnInit ( ) : void {
6161 if ( isPlatformBrowser ( this . platformId ) ) {
6262 this . addressValidator . subscribe ( this . onNewPlaceResult ) ;
63- const options : any = {
63+ const options : AutocompleteOptions = {
6464 // types: ['address'],
6565 // componentRestrictions: {country: this.country},
6666 placeIdOnly : this . placeIdOnly ,
@@ -70,9 +70,9 @@ export class MatGoogleMapsAutocompleteDirective implements OnInit {
7070 } ;
7171
7272 // 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 ;
7474 // tslint:disable-next-line:no-unused-expression
75- this . country ? options . push ( { types : this . types } ) : null ;
75+ this . country ? options . types = this . types : null ;
7676
7777 this . autoCompleteOptions = Object . assign ( this . autoCompleteOptions , options ) ;
7878 this . initGoogleMapsAutocomplete ( ) ;
You can’t perform that action at this time.
0 commit comments