소스 검색

Fixed small issues

Piotr Czajkowski 3 일 전
부모
커밋
d49c825ab1
2개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 2
      ExcelORM/ExcelORM/ExcelDynamicWriter.cs
  2. 2 1
      ExcelORM/ExcelORM/TypeExtensions.cs

+ 0 - 2
ExcelORM/ExcelORM/ExcelDynamicWriter.cs

@@ -37,8 +37,6 @@ public class ExcelDynamicWriter : IDisposable
             false => GenerateHeader(worksheet, values.First()),
         };
 
-        if (rowIndex == null) throw new NullReferenceException(nameof(rowIndex));
-
         foreach (var row in values)
         {
             foreach (var cell in row)

+ 2 - 1
ExcelORM/ExcelORM/TypeExtensions.cs

@@ -54,7 +54,8 @@ public static class TypeExtensions
         }
         catch (OverflowException exception)
         {
-            return Nullable.GetUnderlyingType(property.PropertyType) != null ? null : throw exception;
+            if (Nullable.GetUnderlyingType(property.PropertyType) != null) return null;
+            throw;
         }
     }