mirror of
https://github.com/usebruno/bruno.git
synced 2025-05-05 15:32:58 +00:00
Fix: Falsy values from $<mock>
built-ins are not getting interpolated.
This commit is contained in:
parent
921e1af72b
commit
c950806541
@ -18,7 +18,9 @@ const interpolateMockVars = (str) => {
|
||||
const patternRegex = /\{\{\$(\w+)\}\}/g;
|
||||
return str.replace(patternRegex, (match, keyword) => {
|
||||
const replacement = mockDataFunctions[keyword]?.();
|
||||
return replacement || match;
|
||||
|
||||
if (replacement === undefined) return match;
|
||||
return String(replacement);
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user