mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-22 06:45:08 -04:00
fixed cookie edit saving logic
This commit is contained in:
1 parent
69b771e245
commit
fc6ea3f34d
1 file changed
+4
-5
@@ -94,9 +94,12 @@ class CookieModifyModal extends PureComponent {
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
const newCookie = Object.assign({}, cookie, {[field]: input});
|
||||
|
||||
clearTimeout(this._cookieUpdateTimeout);
|
||||
this._cookieUpdateTimeout = setTimeout(() => {
|
||||
this._handleCookieUpdate(cookie, Object.assign({}, cookie, {[field]: input}));
|
||||
this._handleCookieUpdate(cookie, newCookie);
|
||||
this.setState({cookie: newCookie});
|
||||
}, DEBOUNCE_MILLIS * 2);
|
||||
}
|
||||
|
||||
@@ -104,10 +107,6 @@ class CookieModifyModal extends PureComponent {
|
||||
isValid: {
|
||||
...this.state.isValid,
|
||||
[field]: valid
|
||||
},
|
||||
cookie: {
|
||||
...cookie,
|
||||
[field]: input
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user