浏览代码

fix zero-coalescing roughness (#924)

David Luzar 5 年之前
父节点
当前提交
3a5ca27600
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/data/restore.ts

+ 1 - 1
src/data/restore.ts

@@ -56,7 +56,7 @@ export function restore(
         id: element.id || nanoid(),
         fillStyle: element.fillStyle || "hachure",
         strokeWidth: element.strokeWidth || 1,
-        roughness: element.roughness || 1,
+        roughness: element.roughness ?? 1,
         opacity:
           element.opacity === null || element.opacity === undefined
             ? 100