From 3f1075cbcd6ac677d3596e0b0a596dc359fabfb0 Mon Sep 17 00:00:00 2001 From: lissitz <53315888+lissitz@users.noreply.github.com> Date: Wed, 22 Jan 2020 20:51:56 +0100 Subject: [PATCH] fix: slider value resets to the default value when opacity is 0 (#516) --- src/actions/actionProperties.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/actions/actionProperties.tsx b/src/actions/actionProperties.tsx index af8f9481..49e3e97b 100644 --- a/src/actions/actionProperties.tsx +++ b/src/actions/actionProperties.tsx @@ -26,9 +26,9 @@ const getFormValue = function( defaultValue?: T ): T | null { return ( - (editingElement && getAttribute(editingElement)) || - getCommonAttributeOfSelectedElements(elements, getAttribute) || - defaultValue || + (editingElement && getAttribute(editingElement)) ?? + getCommonAttributeOfSelectedElements(elements, getAttribute) ?? + defaultValue ?? null ); }; @@ -211,7 +211,7 @@ export const actionChangeOpacity: Action = { elements, element => element.opacity, 100 /* default opacity */ - ) || undefined + ) ?? undefined } />