mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing up the RoutePartDriver so it doesn't throw and exception when the slug is null.
--HG-- branch : dev
This commit is contained in:
@@ -54,8 +54,9 @@ namespace Orchard.Core.Routable.Drivers {
|
||||
|
||||
// TEMP: path format patterns replaces this logic
|
||||
var path = part.Path;
|
||||
if (path != null && path.EndsWith(part.Slug)) {
|
||||
model.DisplayLeadingPath = path.Substring(0, path.Length - part.Slug.Length);
|
||||
var slug = part.Slug ?? "";
|
||||
if (path != null && path.EndsWith(slug)) {
|
||||
model.DisplayLeadingPath = path.Substring(0, path.Length - slug.Length);
|
||||
}
|
||||
else {
|
||||
var containerSlug = part.GetContainerSlug();
|
||||
|
Reference in New Issue
Block a user