@@ -5,7 +5,6 @@ import './weather-search.js';
55import './weather-display.js' ;
66
77export class WeatherApp extends LitElement {
8- // eslint-disable-next-line
98 static styles = [
109 designSystemStyles ,
1110 baseStyles ,
@@ -23,7 +22,6 @@ export class WeatherApp extends LitElement {
2322 `
2423 ] ;
2524
26- // eslint-disable-next-line
2725 static properties = {
2826 _searchQuery : { state : true } ,
2927 _isLoading : { state : true } ,
@@ -100,7 +98,7 @@ export class WeatherApp extends LitElement {
10098 try {
10199 this . _setLoading ( true ) ;
102100 this . _clearError ( ) ;
103-
101+
104102 this . _weatherData = await this . _weatherService . getWeatherByCity ( city ) ;
105103 this . _saveLocation ( city ) ;
106104 this . _showWeatherContent ( ) ;
@@ -142,16 +140,16 @@ export class WeatherApp extends LitElement {
142140 }
143141
144142 navigator . geolocation . getCurrentPosition (
145- async ( position ) => {
143+ async ( position ) => {
146144 try {
147145 this . _setLoading ( true ) ;
148146 this . _clearError ( ) ;
149-
147+
150148 const { latitude, longitude } = position . coords ;
151149 this . _weatherData = await this . _weatherService . getWeatherData ( latitude , longitude ) ;
152150 this . _weatherData . locationName = 'Current Location' ;
153151 this . _searchQuery = 'Current Location' ;
154-
152+
155153 this . _showWeatherContent ( ) ;
156154 resolve ( ) ;
157155 } catch ( error ) {
@@ -209,4 +207,4 @@ export class WeatherApp extends LitElement {
209207 }
210208}
211209
212- customElements . define ( 'weather-app' , WeatherApp ) ;
210+ customElements . define ( 'weather-app' , WeatherApp ) ;
0 commit comments