From 1497343173a181d678b4c9bbf60250a12f783f1c Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sun, 11 Jan 2015 19:46:39 +1300 Subject: [PATCH] -Protect against multiple attributes error --- Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs b/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs index b60203a2..6fd669fa 100644 --- a/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs +++ b/Src/Newtonsoft.Json/Utilities/ReflectionUtils.cs @@ -666,7 +666,7 @@ namespace Newtonsoft.Json.Utilities { T[] attributes = GetAttributes(attributeProvider, inherit); - return (attributes != null) ? attributes.SingleOrDefault() : null; + return (attributes != null) ? attributes.FirstOrDefault() : null; } #if !(NETFX_CORE || PORTABLE)