diff --git a/src/AzureIoTHub.Portal.Infrastructure/Services/AWS/AWSDevicePropertyService.cs b/src/AzureIoTHub.Portal.Infrastructure/Services/AWS/AWSDevicePropertyService.cs index 825e4b44d..7fbd10af7 100644 --- a/src/AzureIoTHub.Portal.Infrastructure/Services/AWS/AWSDevicePropertyService.cs +++ b/src/AzureIoTHub.Portal.Infrastructure/Services/AWS/AWSDevicePropertyService.cs @@ -78,8 +78,8 @@ public async Task> GetProperties(string deviceI foreach (var item in items) { - var value = item.IsWritable ? desiredPropertiesAsJson.SelectToken(item.Name)?.Value() : - reportedPropertiesAsJson.SelectToken(item.Name)?.Value(); + var value = item.IsWritable ? desiredPropertiesAsJson?.SelectToken(item.Name)?.Value() : + reportedPropertiesAsJson?.SelectToken(item.Name)?.Value(); result.Add(new DevicePropertyValue {