change First() to FirstOrDefault() to prevent Exception
This commit is contained in:
parent
9d7da9d5b9
commit
2ff8edb5ba
|
|
@ -64,8 +64,8 @@ namespace Elsa.Activities.Http.JavaScript
|
|||
return;
|
||||
}
|
||||
|
||||
var targetTypeName = activityDefinition.Properties.First(x => x.Name == nameof(HttpEndpoint.TargetType)).Expressions.Values.First();
|
||||
var targetTypeSchema = activityDefinition.Properties.First(x => x.Name == nameof(HttpEndpoint.Schema)).Expressions.Values.First();
|
||||
var targetTypeName = activityDefinition.Properties.First(x => x.Name == nameof(HttpEndpoint.TargetType)).Expressions.Values.FirstOrDefault();
|
||||
var targetTypeSchema = activityDefinition.Properties.First(x => x.Name == nameof(HttpEndpoint.Schema)).Expressions.Values.FirstOrDefault();
|
||||
var typeScriptType = notification.GetTypeScriptType(propertyType);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(targetTypeName))
|
||||
|
|
|
|||
Loading…
Reference in a new issue