Skip to content

Commit 535023e

Browse files
authored
Markdown null reference issue fixed. (#979)
* #976 - Markdown null reference issue fixed.
1 parent 34726d9 commit 535023e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blazorbootstrap/Components/Markdown/Markdown.razor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ private List<string> GetLines()
608608
inputs.RemoveAt(0);
609609

610610
// remove last blank line
611-
if (string.IsNullOrWhiteSpace(inputs[^1]))
611+
if (inputs.Count > 0 && string.IsNullOrWhiteSpace(inputs[^1]))
612612
inputs.RemoveAt(inputs.Count - 1);
613613
}
614614

0 commit comments

Comments
 (0)