src/JsRender/Node.vala
authorAlan <alan@roojs.com>
Thu, 25 Jan 2024 09:21:50 +0000 (17:21 +0800)
committerAlan <alan@roojs.com>
Thu, 25 Jan 2024 09:21:50 +0000 (17:21 +0800)
src/JsRender/Node.vala

index f8ac919..a06076a 100644 (file)
@@ -153,12 +153,13 @@ public class JsRender.Node : GLib.Object {
        
        public bool has_parent(Node n) 
        {
-               if (this.parent.oid == n.oid) {
-                       return true;
-               }
                if (this.parent == null) {
                        return false;
                }
+               if (this.parent.oid == n.oid) {
+                       return true;
+               }
+               
 
                return this.parent.has_parent(n);
        }