mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-07 08:34:15 +01:00
refactor script checking in CollectionSettings and FolderSettings
This commit is contained in:
parent
22bc1d4ac5
commit
e025ed8436
@ -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