From e1045372d5da1d5f9a84314efb5329f4b398a13b Mon Sep 17 00:00:00 2001 From: Siddharth Gelera Date: Mon, 10 Nov 2025 19:24:14 +0530 Subject: [PATCH] fix: reset TEMPLATE_VAR_PATTERN lastIndex in URL validatio --- .../Collection/CollectionItem/GenerateCodeItem/index.js | 1 - 1 file changed, 1 deletion(-) 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 d9b9a36bd..ea5939540 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,7 +19,6 @@ const TEMPLATE_VAR_PATTERN = /\{\{([^}]+)\}\}/; const validateURLWithVars = (url) => { const isValid = isValidUrl(url); const hasMissingInterpolations = TEMPLATE_VAR_PATTERN.test(url); - TEMPLATE_VAR_PATTERN.lastIndex = 0; return isValid && !hasMissingInterpolations; };