@@ -113,13 +114,13 @@
if (dataItem is not ShippingDocument && dataItem is not ShippingItem) return;
ShippingDocument? shippingDocument = null;
-
+
if (dataItem is ShippingItem shippingItem) shippingDocument = shippingItem.ShippingDocument;
else shippingDocument = dataItem as ShippingDocument;
if (shippingDocument == null) return;
- if (shippingDocument.ShippingDocumentToFiles?.Count > 0)
+ if (_lazyContentRef != null && shippingDocument.ShippingDocumentToFiles?.Count > 0)
{
// Store the PDF to render
_randomPdf = _pdfFiles[Random.Shared.Next(_pdfFiles.Length)];