Skip to content

Commit

Permalink
Merge pull request #3414 from Pragadesh-45/refactor/collection-folder…
Browse files Browse the repository at this point in the history
…-settings-check

Refactor script checking in CollectionSettings and FolderSettings
  • Loading branch information
lohxt1 authored Nov 4, 2024
2 parents be4fc2d + e025ed8 commit f827b85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion packages/bruno-app/src/components/FolderSettings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || [];
Expand Down

0 comments on commit f827b85

Please sign in to comment.