Skip to content

Commit

Permalink
Markdown null reference issue fixed. (#979)
Browse files Browse the repository at this point in the history
* #976 - Markdown null reference issue fixed.
  • Loading branch information
gvreddy04 authored Dec 16, 2024
1 parent 34726d9 commit 535023e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blazorbootstrap/Components/Markdown/Markdown.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ private List<string> GetLines()
inputs.RemoveAt(0);

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

Expand Down

0 comments on commit 535023e

Please sign in to comment.