mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-24 21:25:45 +00:00
fix: reset TEMPLATE_VAR_PATTERN lastIndex in URL validation
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user