fix: attempt to catch a null ref happening in the Route Descriptor

This commit is contained in:
Andrew Welker
2024-07-22 11:19:34 -05:00
parent 64d6df70b0
commit c56841d95b

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using PepperDash.Core;
using PepperDash.Core;
using Serilog.Events;
using System.Collections.Generic;
using System.Linq;
namespace PepperDash.Essentials.Core
@@ -33,6 +32,11 @@ namespace PepperDash.Essentials.Core
/// <param name="descriptor"></param>
public void AddRouteDescriptor(RouteDescriptor descriptor)
{
if (descriptor == null)
{
return;
}
if (RouteDescriptors.Any(t => t.Destination == descriptor.Destination))
{
Debug.LogMessage(LogEventLevel.Debug, descriptor.Destination,