From 8f37ea874649364e7e5226e3277b299a08608b0e Mon Sep 17 00:00:00 2001 From: Kim Santiago <31145923+kisantia@users.noreply.github.com> Date: Wed, 3 May 2023 13:18:02 -0700 Subject: [PATCH] fix macros not getting replaced in sql project item scripts (#22945) --- extensions/sql-database-projects/src/templates/templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/sql-database-projects/src/templates/templates.ts b/extensions/sql-database-projects/src/templates/templates.ts index e3969f28d0..492e8f9dc5 100644 --- a/extensions/sql-database-projects/src/templates/templates.ts +++ b/extensions/sql-database-projects/src/templates/templates.ts @@ -65,7 +65,7 @@ export function macroExpansion(template: string, macroDict: Map) 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}`);