Explorar o código

Fixed an issue where LinkedProperties were not being updated properly

frogsoftware hai 1 ano
pai
achega
c6da0ab584
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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)
         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;
         }
         }
         
         
     }
     }