Merge pull request #430 from nimesh-madhavan/category_guard
guard against CategoryArray being null
This commit is contained in:
commit
69ea434f36
|
@ -335,7 +335,7 @@ namespace OpenLiveWriter.BlogClient.Clients
|
|||
{
|
||||
var json = reader.ReadToEnd();
|
||||
var item = JsonConvert.DeserializeObject<CategoryResponse>(json);
|
||||
var cats = item?.Feed?.CategoryArray.Select(x => new BlogPostCategory(x.Term));
|
||||
var cats = item?.Feed?.CategoryArray?.Select(x => new BlogPostCategory(x.Term));
|
||||
categories = cats?.ToArray() ?? new BlogPostCategory[0];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue