Remove C# 6 features

This commit is contained in:
Jerrie Pelser
2015-08-19 11:13:18 +07:00
parent 2a9d515ae5
commit 7205001ff3

View File

@@ -71,8 +71,15 @@
private static string TryGetValue(JToken shop, string propertyName)
{
var propertyValue = shop?.First?.First?[propertyName];
return propertyValue?.ToString();
if (shop != null && shop.First != null && shop.First.First != null)
{
var propertyValue = shop.First.First[propertyName];
if (propertyValue != null)
return propertyValue.ToString();
}
return null;
}
}
}