From 2c9c4fbc65136e30ee5daa28a99bcaa665908d60 Mon Sep 17 00:00:00 2001 From: ZaneYork Date: Thu, 4 Jun 2020 18:29:27 +0800 Subject: Bug fix: Provide seed to Aggregate op(for Sequence contains no elements exception, all type was filtered by Where(type => type.BaseType != null) op) --- src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs b/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs index 898d7fad..47cc6508 100644 --- a/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs +++ b/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs @@ -127,7 +127,7 @@ namespace StardewModdingAPI.Framework.ModLoading.Framework return Tuple.Create(anyRewritten, e); } }) - .Aggregate((a, b) => Tuple.Create(a.Item1 || b.Item1, a.Item2 ?? b.Item2)); + .Aggregate(Tuple.Create(false, null as Exception), (a, b) => Tuple.Create(a.Item1 || b.Item1, a.Item2 ?? b.Item2)); bool rewritten = result.Item1; Exception exception = result.Item2; -- cgit