Skip to content

Commit

Permalink
Fixed Select bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kern Herskind Nightingale committed Jan 7, 2013
1 parent 45dd4f1 commit f61e68a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/Herskind.Model.Helper/ItemFactory.cs
Expand Up @@ -77,7 +77,7 @@ protected virtual void RegisterTemplateMappings(string assemblyFilter)

public IEnumerable<T> Select<T>(string query, IItemWrapper context) where T : IItemWrapper
{
var items = SitecoreProvider.SelectItems(query, context.Original as Item);
var items = (context == null) ? SitecoreProvider.SelectItems(query, null) : SitecoreProvider.SelectItems(query, context.Original as Item);
return FilterWrapperTypes<T>(SpawnTypeFromItemList(items));
}

Expand Down
8 changes: 4 additions & 4 deletions code/Herskind.Model.Helper/SitecoreProvider.cs
Expand Up @@ -15,10 +15,10 @@ private Database SitecoreDatabase
{
get
{
if (_database != null)
{
return _database;
}
//if (_database != null)
//{
// return _database;
//}
return Sitecore.Context.Database;
}
}
Expand Down

0 comments on commit f61e68a

Please sign in to comment.