Fix network reject, url paste

This commit is contained in:
Gregory Schier 2017-02-02 07:04:51 -08:00
parent 790ed56e00
commit e42ba9dc56
4 changed files with 6 additions and 9 deletions

View File

@ -216,7 +216,7 @@ export function _actuallySend (renderedRequest, workspace, settings, familyIndex
return _actuallySend(
renderedRequest, workspace, settings, nextFamilyIndex
).then(resolve, reject);
).then(resolve);
}
let message = err.toString();

View File

@ -1,7 +1,7 @@
{
"private": true,
"name": "insomnia",
"version": "4.2.7",
"version": "4.2.9",
"productName": "Insomnia",
"longName": "Insomnia REST Client",
"description": "A simple and beautiful REST API client",

View File

@ -41,9 +41,8 @@ class RequestUrlBar extends Component {
_handleUrlPaste = e => {
/*
* Prevent the change handler from being called. Note that this is in a timeout
* because we want it to happen after the onChange callback. If it happens before,
* then the change will overwrite anything that we do.
* Note that this is in a timeout because we want it to happen after the onChange
* callback. If it happens before, then the change will overwrite anything that we do.
*
* Also, note that there is still a potential race condition here if, for some reason,
* the onChange callback is not called before DEBOUNCE_MILLIS is over. This is extremely
@ -51,10 +50,8 @@ class RequestUrlBar extends Component {
*/
const text = e.clipboardData.getData('text/plain');
setTimeout(() => {
// Clear any update timeouts that may have happened since we started waiting
clearTimeout(this._urlChangeDebounceTimeout);
this.props.onUrlPaste(text);
}, DEBOUNCE_MILLIS);
}, DEBOUNCE_MILLIS * 2);
};
_handleGenerateCode = () => {

View File

@ -61,7 +61,7 @@ export const selectSidebarChildren = createSelector(
selectActiveWorkspace,
selectActiveWorkspaceMeta,
(collapsed, requestsAndRequestGroups, activeWorkspace, activeWorkspaceMeta) => {
const {sidebarFilter} = activeWorkspaceMeta;
const sidebarFilter = activeWorkspaceMeta ? activeWorkspaceMeta.sidebarFilter : '';
function next (parentId) {
const children = requestsAndRequestGroups