浏览代码

Fixed an issue where LinkedProperties were not being updated properly

frogsoftware 1 年之前
父节点
当前提交
c6da0ab584
共有 1 个文件被更改,包括 3 次插入1 次删除
  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;
         }
         
     }