浏览代码

Change code

lindexi 7 年之前
父节点
当前提交
31b88dc589
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/Windows/Avalonia.Direct2D1/PrimitiveExtensions.cs

+ 1 - 4
src/Windows/Avalonia.Direct2D1/PrimitiveExtensions.cs

@@ -136,10 +136,7 @@ namespace Avalonia.Direct2D1
             }
 
             //If we don't enter the code above that it is null. We should set it a default value to solve the null exception.
-            if (dashes == null)
-            {
-                dashes = new float[0];
-            }
+            dashes = dashes ?? Array.Empty<float>();
 
             return new StrokeStyle(factory, properties, dashes);
         }