From 055f3a72ad76adcca11196fceb4d7c9b97126668 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Sat, 3 Jul 2021 15:18:47 -0400 Subject: [PATCH] Fix being able to un-rotate images Since 0 is falsy, this made it impossible to return images to 0 degrees of rotation. Signed-off-by: Robin Townsend --- src/components/views/elements/ImageView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/elements/ImageView.tsx b/src/components/views/elements/ImageView.tsx index 2628170f9c..0de34251d8 100644 --- a/src/components/views/elements/ImageView.tsx +++ b/src/components/views/elements/ImageView.tsx @@ -122,7 +122,7 @@ export default class ImageView extends React.Component { const image = this.image.current; const imageWrapper = this.imageWrapper.current; - const rotation = inputRotation || this.state.rotation; + const rotation = inputRotation ?? this.state.rotation; const imageIsNotFlipped = rotation % 180 === 0;