Skip to content

Commit

Permalink
null check bug fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveWinward committed Jan 20, 2024
1 parent 237d761 commit 8d75b7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/GoogleSheetsWrapper/GoogleSheetsWrapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageProjectUrl>https://github.com/SteveWinward/GoogleSheetsWrapper</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/SteveWinward/GoogleSheetsWrapper</RepositoryUrl>
<Version>2.0.9</Version>
<Version>2.0.10</Version>
<PackageTags>Google Sheets</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>A simple wrapper library that makes it easier to perform CRUD operations against Google Sheets spreadsheets.</Description>
Expand Down
11 changes: 7 additions & 4 deletions src/GoogleSheetsWrapper/SheetHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,15 @@ public BatchUpdateSpreadsheetResponse AppendRows(IList<T> records)

foreach (var record in records)
{
var row = new RowData
if (record != null)
{
Values = record.ConvertToCellData(TabName).Select(b => b.Data).ToList(),
};
var row = new RowData
{
Values = record.ConvertToCellData(TabName).Select(b => b.Data).ToList(),
};

rows.Add(row);
rows.Add(row);
}
}

var appendRequest = new AppendCellsRequest
Expand Down

0 comments on commit 8d75b7c

Please sign in to comment.