From 3a5ca276006a1bfb2f0e3c420726ac11d9ff7b8e Mon Sep 17 00:00:00 2001 From: David Luzar Date: Thu, 12 Mar 2020 17:49:11 +0100 Subject: [PATCH] fix zero-coalescing roughness (#924) --- src/data/restore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/restore.ts b/src/data/restore.ts index 96a2aac8..6d648aab 100644 --- a/src/data/restore.ts +++ b/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