Merge pull request #3414 from Pragadesh-45/refactor/collection-folder-settings-check

Refactor script checking in CollectionSettings and FolderSettings
This commit is contained in:
lohit 2024-11-04 22:07:42 +05:30 committed by GitHub
commit f827b85f47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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 || [];