Skip to content

Commit

Permalink
remove redundant line causing NullReferenceException when slug is emp…
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmylewis authored and madskristensen committed Feb 5, 2018
1 parent c84014e commit 3d351d4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Controllers/BlogController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public async Task<IActionResult> UpdatePost(Post post)

existing.Categories = categories.Split(",", StringSplitOptions.RemoveEmptyEntries).Select(c => c.Trim().ToLowerInvariant()).ToList();
existing.Title = post.Title.Trim();
existing.Slug = post.Slug.Trim();
existing.Slug = !string.IsNullOrWhiteSpace(post.Slug) ? post.Slug.Trim() : Models.Post.CreateSlug(post.Title);
existing.IsPublished = post.IsPublished;
existing.Content = post.Content.Trim();
Expand Down

0 comments on commit 3d351d4

Please sign in to comment.