From 572661d826721690b3d8ef780c0e119da691e23f Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 4 May 2017 20:00:40 +1200 Subject: [PATCH] -Minor refactor --- Src/Newtonsoft.Json/Linq/JsonPath/RootFilter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Newtonsoft.Json/Linq/JsonPath/RootFilter.cs b/Src/Newtonsoft.Json/Linq/JsonPath/RootFilter.cs index 2378477f..00f5b725 100644 --- a/Src/Newtonsoft.Json/Linq/JsonPath/RootFilter.cs +++ b/Src/Newtonsoft.Json/Linq/JsonPath/RootFilter.cs @@ -12,7 +12,7 @@ namespace Newtonsoft.Json.Linq.JsonPath public override IEnumerable ExecuteFilter(JToken root, IEnumerable current, bool errorWhenNoMatch) { - yield return root; + return new[] { root }; } } } \ No newline at end of file