Fix NRE error in PoS report

This commit is contained in:
nicolas.dorier 2023-07-24 23:20:17 +09:00
parent 08e21c1a5d
commit 05b01a13c8
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -78,8 +78,8 @@ public class ProductsReportProvider : ReportProvider
}
else
{
var posData = i.Metadata.PosData?.ToObject<PosAppData>();
if (posData.Cart is { } cart)
var posData = i.Metadata?.PosData?.ToObject<PosAppData>();
if (posData?.Cart is { } cart)
{
foreach (var item in cart)
{