Skip to content

Commit eb0673b

Browse files
committed
fixed an exception in case of no text in the returned synthaxBase value
1 parent df3a1b3 commit eb0673b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Bicep.Core/Emit/PlaceholderParametersJsonWriter.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@ private JToken GenerateTemplate(string contentVersion)
101101

102102
jsonWriter.WriteStartObject();
103103

104-
emitter.EmitProperty("value", value);
104+
// emit value property only if the text is not null
105+
if (value.ToString() != "\r\n")
106+
{
107+
emitter.EmitProperty("value", value);
108+
}
105109

106110
jsonWriter.WriteEndObject();
107111
}

0 commit comments

Comments
 (0)