mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-29 11:23:57 +01:00
fix(#964): Fix Handlebars interpolation when env var has "." in name
This commit is contained in:
parent
2ee6c5effc
commit
bad9d0a3ef
@ -43,7 +43,9 @@ const interpolateVars = (request, envVars = {}, collectionVariables = {}, proces
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
const template = Handlebars.compile(str, { noEscape: true });
|
// Handlebars doesn't allow dots as identifiers, so we need to use literal segments
|
||||||
|
let strLiteralSegment = str.replace('{{', '{{[').replace('}}', ']}}');
|
||||||
|
const template = Handlebars.compile(strLiteralSegment, { noEscape: true });
|
||||||
|
|
||||||
// collectionVariables take precedence over envVars
|
// collectionVariables take precedence over envVars
|
||||||
const combinedVars = {
|
const combinedVars = {
|
||||||
|
Loading…
Reference in New Issue
Block a user