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'