Roo/bootstrap/NavItem.js
authorAlan Knowles <alan@roojs.com>
Tue, 10 Mar 2015 07:10:30 +0000 (15:10 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 10 Mar 2015 07:10:30 +0000 (15:10 +0800)
Roo/bootstrap/NavItem.js

index 61a79de..b19fcfa 100644 (file)
@@ -145,10 +145,10 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
         if(this.fireEvent('click', this, e) === false){
             return;
         };
-        
-        if (['tabs','pills'].indexOf(this.parent().type)!==-1) {
-            if (typeof(this.parent().setActiveItem) !== 'undefined') {
-                this.parent().setActiveItem(this);
+        var p = this.parent();
+        if (['tabs','pills'].indexOf(p.type)!==-1) {
+            if (typeof(p.setActiveItem) !== 'undefined') {
+                p.setActiveItem(this);
             }
         }
         // if parent is a navbarheader....