File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ export class LocationAction implements Action {
17
17
export class LoadLocations implements Action {
18
18
readonly type = LocationActionTypes . LoadLocations ;
19
19
20
- constructor ( readonly payload : { locationData : LocationData , error : null } ) {
20
+ constructor ( readonly payload : { locationData : LocationData } ) {
21
21
22
22
}
23
23
}
24
24
25
25
export class LocationsError implements Action {
26
26
readonly type = LocationActionTypes . LocationsError ;
27
27
28
- constructor ( readonly payload : { locationData : null , error : string } ) {
28
+ constructor ( readonly payload : { error : string } ) {
29
29
30
30
}
31
31
}
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ export class WeatherComponent implements OnInit {
180
180
}
181
181
}
182
182
183
- this . store . dispatch ( new LoadLocations ( { locationData : this . locationData , error : null } ) ) ;
183
+ this . store . dispatch ( new LoadLocations ( { locationData : this . locationData } ) ) ;
184
184
}
185
185
186
186
onSelectionChanged ( event : MatAutocompleteSelectedEvent ) {
@@ -191,7 +191,7 @@ export class WeatherComponent implements OnInit {
191
191
this . locationData . latitude = latitude . toFixed ( 4 ) . toString ( ) ;
192
192
this . locationData . longitude = longitude . toFixed ( 4 ) . toString ( ) ;
193
193
this . store . dispatch ( new LoadWeather ( { weatherData : null } ) ) ;
194
- this . store . dispatch ( new LoadLocations ( { locationData : this . locationData , error : null } ) ) ;
194
+ this . store . dispatch ( new LoadLocations ( { locationData : this . locationData } ) ) ;
195
195
break ;
196
196
}
197
197
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export class WeatherEffects {
20
20
map ( weather => {
21
21
return ( new LoadWeather ( { weatherData : weather } ) ) ;
22
22
} ) ,
23
- catchError ( ( errorMessage ) => of ( new LocationsError ( { locationData : null , error : errorMessage } ) ) )
23
+ catchError ( ( errorMessage ) => of ( new LocationsError ( { error : errorMessage } ) ) )
24
24
) )
25
25
) ;
26
26
You can’t perform that action at this time.
0 commit comments