mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +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
|
||||
</div>
|
||||
<div className="dropdown-item" onClick={(e) => {
|
||||
menuDropdownTippyRef.current.hide();
|
||||
setShowRenameCollectionModal(true);
|
||||
}}>
|
||||
Rename
|
||||
</div>
|
||||
{!isLocal ? (
|
||||
<div className="dropdown-item" onClick={(e) => {
|
||||
menuDropdownTippyRef.current.hide();
|
||||
setShowRenameCollectionModal(true);
|
||||
}}>
|
||||
Rename
|
||||
</div>
|
||||
) : null}
|
||||
<div className="dropdown-item" onClick={(e) => {
|
||||
menuDropdownTippyRef.current.hide();
|
||||
handleExportClick(true);
|
||||
|
@ -165,8 +165,10 @@ export const saveRequest = (itemUid, collectionUid) => (dispatch, getState) => {
|
||||
return reject(new Error('Collection not found'));
|
||||
}
|
||||
|
||||
const collectionCopy = cloneDeep(collection);
|
||||
|
||||
if(isLocalCollection(collection)) {
|
||||
const item = findItemInCollection(collection, itemUid);
|
||||
const item = findItemInCollection(collectionCopy, itemUid);
|
||||
if(item) {
|
||||
const itemToSave = transformRequestToSaveToFilesystem(item);
|
||||
const { ipcRenderer } = window;
|
||||
@ -182,7 +184,6 @@ export const saveRequest = (itemUid, collectionUid) => (dispatch, getState) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const collectionCopy = cloneDeep(collection);
|
||||
const collectionToSave = transformCollectionToSaveToIdb(collectionCopy);
|
||||
|
||||
collectionSchema
|
||||
|
Loading…
Reference in New Issue
Block a user