Some response filter tweaks

This commit is contained in:
Gregory Schier 2017-06-07 19:53:46 -07:00
parent 164f5f9762
commit 8611016ba8
2 changed files with 7 additions and 2 deletions

View File

@ -602,7 +602,7 @@ class CodeEditor extends PureComponent {
/> />
); );
if (filterHistory.length) { if (filterHistory && filterHistory.length) {
toolbarChildren.push( toolbarChildren.push(
<Dropdown key="history" className="tall" right> <Dropdown key="history" className="tall" right>
<DropdownButton className="btn btn--compact"> <DropdownButton className="btn btn--compact">
@ -709,7 +709,7 @@ CodeEditor.propTypes = {
defaultTabBehavior: PropTypes.bool, defaultTabBehavior: PropTypes.bool,
readOnly: PropTypes.bool, readOnly: PropTypes.bool,
filter: PropTypes.string, filter: PropTypes.string,
filterHistory: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired, filterHistory: PropTypes.arrayOf(PropTypes.string.isRequired),
singleLine: PropTypes.bool, singleLine: PropTypes.bool,
debounceMillis: PropTypes.number, debounceMillis: PropTypes.number,
dynamicHeight: PropTypes.bool dynamicHeight: PropTypes.bool

View File

@ -382,6 +382,11 @@ class App extends PureComponent {
return; return;
} }
// Blank?
if (!responseFilter) {
return;
}
responseFilterHistory.unshift(responseFilter); responseFilterHistory.unshift(responseFilter);
await this._updateRequestMetaByParentId(requestId, {responseFilterHistory}); await this._updateRequestMetaByParentId(requestId, {responseFilterHistory});
}, 2000); }, 2000);