From ca067830bad3a5bffb3b3d2123cde494a370ce7b Mon Sep 17 00:00:00 2001 From: David Date: Mon, 27 May 2024 08:15:47 -0400 Subject: [PATCH] chore: Fix net7.0 build --- src/Uno.UI/Helpers/WeakEvents/WeakEventManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Uno.UI/Helpers/WeakEvents/WeakEventManager.cs b/src/Uno.UI/Helpers/WeakEvents/WeakEventManager.cs index 38b6eb3d32f4..c90ad4821268 100644 --- a/src/Uno.UI/Helpers/WeakEvents/WeakEventManager.cs +++ b/src/Uno.UI/Helpers/WeakEvents/WeakEventManager.cs @@ -105,7 +105,7 @@ private void AddTo(Dictionary> handlersPerEvent, string eve #if NET8_0_OR_GREATER handlers = handlers![..]; #else - handlers = handlers!.ToArray(); + handlers = handlers!.ToList(); #endif } @@ -127,7 +127,7 @@ private void RemoveFrom(Dictionary> handlersPerEvent, strin #if NET8_0_OR_GREATER handlers = handlers[..]; #else - handlers = handlers!.ToArray(); + handlers = handlers!.ToList(); #endif }