mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-27 02:13:54 +01:00
Merge pull request #3414 from Pragadesh-45/refactor/collection-folder-settings-check
Refactor script checking in CollectionSettings and FolderSettings
This commit is contained in:
commit
f827b85f47
@ -40,7 +40,7 @@ const CollectionSettings = ({ collection }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const root = collection?.root;
|
const root = collection?.root;
|
||||||
const hasScripts = root?.request?.script.res || root?.request?.script.req;
|
const hasScripts = root?.request?.script?.res || root?.request?.script?.req;
|
||||||
const hasTests = root?.request?.tests;
|
const hasTests = root?.request?.tests;
|
||||||
const hasDocs = root?.docs;
|
const hasDocs = root?.docs;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ const FolderSettings = ({ collection, folder }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const folderRoot = collection?.items.find((item) => item.uid === folder?.uid)?.root;
|
const folderRoot = collection?.items.find((item) => item.uid === folder?.uid)?.root;
|
||||||
const hasScripts = folderRoot?.request?.script.res || folderRoot?.request?.script.req;
|
const hasScripts = folderRoot?.request?.script?.res || folderRoot?.request?.script?.req;
|
||||||
const hasTests = folderRoot?.request?.tests;
|
const hasTests = folderRoot?.request?.tests;
|
||||||
|
|
||||||
const headers = folderRoot?.request?.headers || [];
|
const headers = folderRoot?.request?.headers || [];
|
||||||
|
Loading…
Reference in New Issue
Block a user