This repository was archived by the owner on Jun 30, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
skills/csharp/experimental/weatherskill Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ private async Task<DialogTurnResult> RouteToGeographyPromptOrForecastResponse(Wa
6666 var state = await _stateAccessor . GetAsync ( stepContext . Context ) ;
6767 var geography = state . Geography ;
6868
69- if ( string . IsNullOrEmpty ( geography ) && state . Latitude == double . NaN )
69+ if ( string . IsNullOrEmpty ( geography ) && double . IsNaN ( state . Latitude ) )
7070 {
7171 return await stepContext . NextAsync ( ) ;
7272 }
@@ -122,7 +122,7 @@ private async Task<DialogTurnResult> GetWeatherResponse(WaterfallStepContext ste
122122 {
123123 state . GeographyLocation = await service . GetLocationByQueryAsync ( state . Geography ) ;
124124 }
125- else if ( state . Latitude != double . NaN )
125+ else if ( ! double . IsNaN ( state . Latitude ) )
126126 {
127127 state . GeographyLocation = await service . GetLocationByGeoAsync ( state . Latitude , state . Longitude ) ;
128128 }
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ namespace WeatherSkill.Models
77{
88 public class SkillState
99 {
10+ public SkillState ( )
11+ {
12+ Clear ( ) ;
13+ }
14+
1015 public string Token { get ; internal set ; }
1116
1217 public WeatherSkillLuis LuisResult { get ; internal set ; }
You can’t perform that action at this time.
0 commit comments