From 535023ec52636df6e7a99513a67c3178aaf32c47 Mon Sep 17 00:00:00 2001 From: Vikram Reddy Date: Mon, 16 Dec 2024 22:15:31 +0530 Subject: [PATCH] Markdown null reference issue fixed. (#979) * #976 - Markdown null reference issue fixed. --- blazorbootstrap/Components/Markdown/Markdown.razor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blazorbootstrap/Components/Markdown/Markdown.razor.cs b/blazorbootstrap/Components/Markdown/Markdown.razor.cs index df8a60c45..c80a84b49 100644 --- a/blazorbootstrap/Components/Markdown/Markdown.razor.cs +++ b/blazorbootstrap/Components/Markdown/Markdown.razor.cs @@ -608,7 +608,7 @@ private List 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); }