diff --git a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/index.js b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/index.js index 728cb7a7b..1557b06f1 100644 --- a/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/index.js +++ b/packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/GenerateCodeItem/index.js @@ -19,6 +19,7 @@ const TEMPLATE_VAR_PATTERN = /\{\{([^}]+)\}\}/g; const validateURLWithVars = (url) => { const isValid = isValidUrl(url); const hasMissingInterpolations = TEMPLATE_VAR_PATTERN.test(url); + TEMPLATE_VAR_PATTERN.lastIndex = 0; return isValid && !hasMissingInterpolations; };