From bddcd63b6fc016f0bd113ae75efb8ae0082afc98 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 12 Oct 2017 21:11:06 +0200 Subject: [PATCH] Fix Content type active checkmark --- app/ui/components/dropdowns/content-type-dropdown.js | 7 ++++--- app/ui/components/request-pane.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/ui/components/dropdowns/content-type-dropdown.js b/app/ui/components/dropdowns/content-type-dropdown.js index 1c903598ce..e9a24017e7 100644 --- a/app/ui/components/dropdowns/content-type-dropdown.js +++ b/app/ui/components/dropdowns/content-type-dropdown.js @@ -10,7 +10,7 @@ import type {Request, RequestBody} from '../../../models/request'; type Props = { onChange: Function, - contentType: string | null, + contentType: ?string, children: ?React.Node, // Optional @@ -68,8 +68,9 @@ class ContentTypeDropdown extends React.PureComponent { } _renderDropdownItem (mimeType: string | null, forcedName: string = '') { - const contentType = typeof this.props.contentType !== 'string' - ? EMPTY_MIME_TYPE : this.props.contentType; + const contentType = typeof this.props.contentType === 'string' + ? this.props.contentType + : EMPTY_MIME_TYPE; const iconClass = mimeType === contentType ? 'fa-check' : 'fa-empty'; diff --git a/app/ui/components/request-pane.js b/app/ui/components/request-pane.js index 3cd90f9873..cea3ec64ec 100644 --- a/app/ui/components/request-pane.js +++ b/app/ui/components/request-pane.js @@ -267,7 +267,7 @@ class RequestPane extends React.PureComponent { {typeof request.body.mimeType === 'string'