From 3a0db14c404e62dafe666b611f11e0d801698752 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Thu, 2 Aug 2018 16:52:57 +0100 Subject: [PATCH] Minor tweaks --- src/components/App/index.tsx | 2 +- src/components/Options/index.tsx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index c1c75c41..c8034c2a 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -159,7 +159,7 @@ export default class App extends Component { // options should always be correct for the type, but TypeScript isn't smart enough. const encoderState: EncoderState = { type, - options: options ? options : encoderMap[type].defaultOptions, + options: options || encoderMap[type].defaultOptions, } as EncoderState; images[index] = { diff --git a/src/components/Options/index.tsx b/src/components/Options/index.tsx index 97bcbe10..ae75e2b9 100644 --- a/src/components/Options/index.tsx +++ b/src/components/Options/index.tsx @@ -125,14 +125,12 @@ export default class Options extends Component { /> Enable - {preprocessorState.quantizer.enabled ? ( + {preprocessorState.quantizer.enabled && - ) : ( -
- )} + }