roojs-debug.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 7 Jul 2011 04:29:00 +0000 (12:29 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 7 Jul 2011 04:29:00 +0000 (12:29 +0800)
roojs-debug.js

index 28a2a33..07b2870 100644 (file)
@@ -51382,8 +51382,13 @@ Roo.extend(Roo.XComponent, Roo.util.Observable, {
         
         if (!el && typeof(this.parent) == 'string' && this.parent[0] == '#') {
             // if parent is a '#.....' string, then let's use that..
+            var ename = this.parent.substr(1)
             this.parent = false;
-            el = Roo.get(m.substr(1));
+            el = Roo.get(ename);
+            if (!el) {
+                Roo.log("Warning - element can not be found :#" + ename );
+                return;
+            }
         }
         if (!this.parent) {