Fix null reference exception

This commit is contained in:
Sergey Chebotar 2023-05-24 10:48:52 +03:00
parent 79eeb2a206
commit d058b3ed4e

View File

@ -161,6 +161,10 @@ public class GuessReader : IReader
var productCells = productColumn.Value2; var productCells = productColumn.Value2;
object currentProductCell = productColumn.Rows.Count == 1 ? productCells : productCells[row, 1]; object currentProductCell = productColumn.Rows.Count == 1 ? productCells : productCells[row, 1];
if (currentProductCell == null)
{
continue;
}
if (ProductSku.TryParse(currentProductCell.ToString(), out IEnumerable<ProductSku> skus)) if (ProductSku.TryParse(currentProductCell.ToString(), out IEnumerable<ProductSku> skus))
{ {