diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js index 7ea7b170..d76aadc3 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/CodeView/index.js @@ -20,7 +20,7 @@ const CodeView = ({ language, item }) => { item.uid ); - const headers = [...collection?.root?.request?.headers, ...requestHeaders]; + const headers = [...(collection?.root?.request?.headers || []), ...(requestHeaders || [])]; let snippet = '';