mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Fixed a bug in HomeAliasService
The bug would cause a null reference exception in case there is no alias with an empty string (the home alias).
This commit is contained in:
@@ -31,6 +31,10 @@ namespace Orchard.Autoroute.Services {
|
|||||||
|
|
||||||
public IContent GetHomePage(VersionOptions version = null) {
|
public IContent GetHomePage(VersionOptions version = null) {
|
||||||
var homePageRoute = GetHomeRoute();
|
var homePageRoute = GetHomeRoute();
|
||||||
|
|
||||||
|
if (homePageRoute == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
var alias = LookupAlias(homePageRoute);
|
var alias = LookupAlias(homePageRoute);
|
||||||
|
|
||||||
if (alias == null)
|
if (alias == null)
|
||||||
|
Reference in New Issue
Block a user