浏览代码

Further fix to LoggablePropertyAttribute serialization

Frank van den Bos 2 年之前
父节点
当前提交
53b101211f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      InABox.Core/DataTable.cs

+ 2 - 2
InABox.Core/DataTable.cs

@@ -826,9 +826,9 @@ namespace InABox.Core
             {
                 writer.Write(time.Ticks);
             }
-            else if (type == typeof(LoggablePropertyAttribute) && value is LoggablePropertyAttribute lpa)
+            else if (type == typeof(LoggablePropertyAttribute))
             {
-                writer.Write(lpa.Format ?? "");
+                writer.Write((value as LoggablePropertyAttribute)?.Format ?? "");
             }
             else
             {