fix zero-coalescing roughness (#924)

This commit is contained in:
David Luzar 2020-03-12 17:49:11 +01:00 committed by GitHub
parent 2db2f3f5e4
commit 3a5ca27600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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