Pārlūkot izejas kodu

Fixed an issue where LinkedProperties were not being updated properly

frogsoftware 1 gadu atpakaļ
vecāks
revīzija
c6da0ab584
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      InABox.Core/LinkedProperties.cs

+ 3 - 1
InABox.Core/LinkedProperties.cs

@@ -22,7 +22,9 @@ namespace InABox.Core
 
         public static IEnumerable<ILinkedProperty> Find(object parent, object path)
         {
-            return _LinkedProperties.Where(x => (x.Type == parent.GetType()) && (CoreUtils.GetPropertyValue(parent,x.Path) == path));
+            var all =  _LinkedProperties.Where(x => x.Type == parent.GetType());
+            var filtered =  all.Where(x => CoreUtils.GetPropertyValue(parent,x.Path)?.GetType() == path?.GetType());
+            return filtered;
         }
         
     }