mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-21 22:35:03 -04:00
Fix Content type active checkmark
This commit is contained in:
1 parent
0d56b84c21
commit
bddcd63b6f
2 files changed
+5
-4
No files matched your search
@@ -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