fix macros not getting replaced in sql project item scripts (#22945)

This commit is contained in:
Kim Santiago
2023-05-03 13:18:02 -07:00
committed by GitHub
parent 55d652198c
commit 8f37ea8746

View File

@@ -65,7 +65,7 @@ export function macroExpansion(template: string, macroDict: Map<string, string>)
const macroIndicator = '@@';
let output = template;
for (const macro in macroDict) {
for (const macro of macroDict.keys()) {
// check if value contains the macroIndicator, which could break expansion for successive macros
if (macroDict.get(macro)!.includes(macroIndicator)) {
throw new Error(`Macro value ${macroDict.get(macro)} is invalid because it contains ${macroIndicator}`);