Skip to content

Commit

Permalink
fix(proxy): null reference exception bij null wozobjecten collectie
Browse files Browse the repository at this point in the history
  • Loading branch information
MelvLee committed Feb 8, 2024
1 parent 9fad55f commit 1053544
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ public static string Transform(this string payload, bool isObject)
else
{
var wozObjecten = JsonConvert.DeserializeObject<DataTransferObjects.WozObjectHalCollectie>(payload);
foreach (var wozObject in wozObjecten._embedded.WozObjecten)
if(wozObjecten._embedded.WozObjecten != null)
{
wozObject.Waarden = wozObject.Waarden.BepaalRelevanteWaarden()?.ToArray();
foreach (var wozObject in wozObjecten._embedded.WozObjecten)
{
wozObject.Waarden = wozObject.Waarden.BepaalRelevanteWaarden()?.ToArray();
}
}

retval = JsonConvert.SerializeObject(wozObjecten);
Expand Down

0 comments on commit 1053544

Please sign in to comment.