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:
Sipke Schoorstra
2015-12-30 17:28:23 +01:00
parent d21aae3506
commit c8b5664d26

View File

@@ -31,6 +31,10 @@ namespace Orchard.Autoroute.Services {
public IContent GetHomePage(VersionOptions version = null) {
var homePageRoute = GetHomeRoute();
if (homePageRoute == null)
return null;
var alias = LookupAlias(homePageRoute);
if (alias == null)