- 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;