mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-22 23:28:33 -04:00
fix warning (#5315)
This commit is contained in:
@@ -69,12 +69,13 @@ export const CookieModifyModal = forwardRef<CookieModifyModalHandle, ModalProps>
|
||||
let rawDefaultValue;
|
||||
if (!cookie) {
|
||||
rawDefaultValue = '';
|
||||
}
|
||||
try {
|
||||
rawDefaultValue = cookieToString(toughCookie.Cookie.fromJSON(JSON.stringify(cookie)));
|
||||
} catch (err) {
|
||||
console.warn('Failed to parse cookie string', err);
|
||||
rawDefaultValue = '';
|
||||
} else {
|
||||
try {
|
||||
rawDefaultValue = cookieToString(toughCookie.Cookie.fromJSON(JSON.stringify(cookie)));
|
||||
} catch (err) {
|
||||
console.warn('Failed to parse cookie string', err);
|
||||
rawDefaultValue = '';
|
||||
}
|
||||
}
|
||||
return (
|
||||
<Modal ref={modalRef}>
|
||||
|
||||
Reference in New Issue
Block a user