mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 00:18:39 +00:00
Fix infinite redirect when slot name generates empty slug
This commit is contained in:
parent
b39038008d
commit
9dc7ce27e1
1 changed files with 2 additions and 1 deletions
|
@ -47,7 +47,8 @@ public class SlotPage : BaseLayout
|
|||
return this.NotFound();
|
||||
|
||||
string slotSlug = slot.GenerateSlug();
|
||||
if (slug == null || slotSlug != slug)
|
||||
// Only redirect if there is a valid slug for this level and the current slug doesn't match
|
||||
if (!string.IsNullOrWhiteSpace(slotSlug) && (slug == null || slotSlug != slug))
|
||||
{
|
||||
return this.Redirect($"~/slot/{id}/{slotSlug}");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue