Merge pull request #1694 from umbraco/temp-U4-9395

Temp u4 9395
This commit is contained in:
Sebastiaan Janssen
2017-01-18 08:56:08 +01:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -92,7 +92,12 @@ namespace Umbraco.Web.PropertyEditors
//swallow...on purpose, there's a chance that this isn't json and we don't want that to affect
// the website.
}
catch (ArgumentException)
{
//swallow on purpose to prevent this error:
// Can not add Newtonsoft.Json.Linq.JValue to Newtonsoft.Json.Linq.JObject.
}
}
}
}

View File

@@ -238,7 +238,9 @@ namespace UmbracoExamine
var fields = base.GetSpecialFieldsToIndex(allValuesForIndexing);
//adds the special path property to the index
fields.Add("__key", allValuesForIndexing["__key"]);
string valuesForIndexing;
if (allValuesForIndexing.TryGetValue("__key", out valuesForIndexing))
fields.Add("__key", valuesForIndexing);
return fields;