mirror of
https://github.com/Kong/insomnia.git
synced 2026-05-24 16:51:06 -04:00
Fix Content type active checkmark
This commit is contained in:
@@ -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<Props> {
|
||||
}
|
||||
|
||||
_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';
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ class RequestPane extends React.PureComponent<Props> {
|
||||
<TabList>
|
||||
<Tab>
|
||||
<ContentTypeDropdown onChange={updateRequestMimeType}
|
||||
contentType={request.body.mimeType || ''}
|
||||
contentType={request.body.mimeType}
|
||||
request={request}
|
||||
className="tall">
|
||||
{typeof request.body.mimeType === 'string'
|
||||
|
||||
Reference in New Issue
Block a user