mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-27 14:44:07 +00:00
rm: optional chaining
This commit is contained in:
@@ -21,7 +21,7 @@ export const resolveInheritedAuth = (item, collection) => {
|
||||
...(item.draft?.request || {})
|
||||
};
|
||||
|
||||
const authMode = mergedRequest?.auth?.mode;
|
||||
const authMode = mergedRequest.auth.mode;
|
||||
|
||||
// If auth is not inherit or no auth defined, return the merged request as is
|
||||
if (!authMode || authMode !== 'inherit') {
|
||||
|
||||
@@ -27,7 +27,7 @@ const generateSnippet = ({ language, item, collection, shouldInterpolate = false
|
||||
|
||||
// Add auth headers if needed
|
||||
if (request.auth && request.auth.mode !== 'none') {
|
||||
const authHeaders = getAuthHeaders(collection?.root?.request?.auth, request.auth);
|
||||
const authHeaders = getAuthHeaders(collection.root.request.auth, request.auth);
|
||||
headers = [...headers, ...authHeaders];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user