Skip to content

Commit 6c5cb81

Browse files
Removed superfluous null check in OpenXmlTemplate.Impl.cs
Signed-off-by: Michele Bastione <michele.bastione@gmail.com>
1 parent 5993dd3 commit 6c5cb81

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/MiniExcel.OpenXml/Templates/OpenXmlTemplate.Impl.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -779,15 +779,12 @@ await writer.WriteAsync(finalXml
779779
if (iEnumerableIndex == rowInfo.CellIEnumerableValuesCount)
780780
continue;
781781

782-
if (rowInfo.IEnumerableMercell is not null)
783-
continue;
784-
785782
// https://github.com/mini-software/MiniExcel/assets/12729184/1a699497-57e8-4602-b01e-9ffcfef1478d
786-
if (rowInfo.IEnumerableMercell?.Height is null)
783+
if (rowInfo.IEnumerableMercell?.Height is not { } height)
787784
continue;
788785

789786
// https://github.com/mini-software/MiniExcel/issues/207#issuecomment-824518897
790-
for (int i = 1; i < rowInfo.IEnumerableMercell.Height; i++)
787+
for (int i = 1; i < height; i++)
791788
{
792789
mergeBaseRowIndex++;
793790
var newRow = row.Clone() as XmlElement;

0 commit comments

Comments
 (0)