Skip to content

Commit

Permalink
Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into …
Browse files Browse the repository at this point in the history
…dev-v7
  • Loading branch information
Shazwazza committed Feb 20, 2015
2 parents 9a89b60 + 8c13b89 commit 7dad078
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/umbraco.cms/businesslogic/Dictionary.cs
Expand Up @@ -93,7 +93,6 @@ public static DictionaryItem[] getTopMostItems
/// </summary>
public class DictionaryItem
{

private string _key;

internal Guid UniqueId { get; private set; }
Expand All @@ -118,13 +117,12 @@ public DictionaryItem(string key)
{
EnsureCache();

var item = DictionaryItems.Values.SingleOrDefault(x => x.key == key);

if (item == null)
if (!DictionaryItems.ContainsKey(key))
{
throw new ArgumentException("No key " + key + " exists in dictionary");
}

var item = DictionaryItems[key];
this.id = item.id;
this._key = item.key;
this.ParentId = item.ParentId;
Expand Down

0 comments on commit 7dad078

Please sign in to comment.