Skip to content

Commit

Permalink
#976 - Markdown null reference issue fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvreddy04 committed Dec 16, 2024
1 parent 34726d9 commit 4e1284b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blazorbootstrap/Components/Markdown/Markdown.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,9 @@ private List<string> GetLines()
// remove first blank line
if (string.IsNullOrWhiteSpace(inputs[0]))
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 4e1284b

Please sign in to comment.