mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-16 17:51:48 +01:00
fix: fixed issue while saving json in local collections
This commit is contained in:
parent
eefef27dec
commit
5fc9bbd729
@ -102,12 +102,14 @@ const Collection = ({collection, searchText}) => {
|
|||||||
}}>
|
}}>
|
||||||
New Folder
|
New Folder
|
||||||
</div>
|
</div>
|
||||||
<div className="dropdown-item" onClick={(e) => {
|
{!isLocal ? (
|
||||||
menuDropdownTippyRef.current.hide();
|
<div className="dropdown-item" onClick={(e) => {
|
||||||
setShowRenameCollectionModal(true);
|
menuDropdownTippyRef.current.hide();
|
||||||
}}>
|
setShowRenameCollectionModal(true);
|
||||||
Rename
|
}}>
|
||||||
</div>
|
Rename
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
<div className="dropdown-item" onClick={(e) => {
|
<div className="dropdown-item" onClick={(e) => {
|
||||||
menuDropdownTippyRef.current.hide();
|
menuDropdownTippyRef.current.hide();
|
||||||
handleExportClick(true);
|
handleExportClick(true);
|
||||||
|
@ -165,8 +165,10 @@ export const saveRequest = (itemUid, collectionUid) => (dispatch, getState) => {
|
|||||||
return reject(new Error('Collection not found'));
|
return reject(new Error('Collection not found'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const collectionCopy = cloneDeep(collection);
|
||||||
|
|
||||||
if(isLocalCollection(collection)) {
|
if(isLocalCollection(collection)) {
|
||||||
const item = findItemInCollection(collection, itemUid);
|
const item = findItemInCollection(collectionCopy, itemUid);
|
||||||
if(item) {
|
if(item) {
|
||||||
const itemToSave = transformRequestToSaveToFilesystem(item);
|
const itemToSave = transformRequestToSaveToFilesystem(item);
|
||||||
const { ipcRenderer } = window;
|
const { ipcRenderer } = window;
|
||||||
@ -182,7 +184,6 @@ export const saveRequest = (itemUid, collectionUid) => (dispatch, getState) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const collectionCopy = cloneDeep(collection);
|
|
||||||
const collectionToSave = transformCollectionToSaveToIdb(collectionCopy);
|
const collectionToSave = transformCollectionToSaveToIdb(collectionCopy);
|
||||||
|
|
||||||
collectionSchema
|
collectionSchema
|
||||||
|
Loading…
Reference in New Issue
Block a user