mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-23 08:23:41 +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 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 hasDocs = root?.docs;
|
||||
|
||||
|
@ -26,7 +26,7 @@ const FolderSettings = ({ collection, folder }) => {
|
||||
}
|
||||
|
||||
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 headers = folderRoot?.request?.headers || [];
|
||||
|
Loading…
Reference in New Issue
Block a user