fix: Fixes timers not stopping before OnTick (#1890)

This commit is contained in:
Kamron Batman 2024-07-28 14:35:41 -07:00 • committed by GitHub
parent 4610712205
commit 2d9872b53a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 68 additions and 39 deletions

View file

@ -746,7 +746,7 @@ public static class Utility
public static T RandomList<T>(params T[] list) => list.RandomElement();
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T RandomElement<T>(this ReadOnlySpan<T> list) => list.Length == 0 ? (T)default : list[Random(list.Length)];
public static T RandomElement<T>(this ReadOnlySpan<T> list) => list.Length == 0 ? default : list[Random(list.Length)];
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T RandomElement<T>(this T[] list) => list.RandomElement(default);