Pman.js
authorAlan Knowles <alan@akbkhome.com>
Sat, 31 Mar 2012 08:34:10 +0000 (16:34 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sat, 31 Mar 2012 08:34:10 +0000 (16:34 +0800)
Pman.js

diff --git a/Pman.js b/Pman.js
index cacf2df..00da0f6 100644 (file)
--- a/Pman.js
+++ b/Pman.js
@@ -827,20 +827,24 @@ Pman = new Roo.Document(
         
         
         
-        if (!obj.parent) {
-            if (obj.parent === false) {
-                obj.disabled = true;
-                console.log('ignoring top level object (as parent===false found)');
-                console.log(obj);
-                return;
-            }
-            // this is an error condition - the parent does not exist..
-            // technically it should not happen..
+        if (typeof(obj.parent) == 'undefined') {
             console.log("Parent is undefined");
             console.log(obj);
             obj.disabled = true;
             return;
         }
+            
+            
+        if (obj.parent === false) {
+            obj.disabled = true;
+            console.log('ignoring top level object (as parent===false found)');
+            console.log(obj);
+            return;
+        }
+        // this is an error condition - the parent does not exist..
+            // technically it should not happen..
+            
+        }
         // hack for Pman parent == Pman..
         if (obj.parent == obj.module) {
             obj.parent = false;