Roo/bootstrap/NavItem.js
[roojs1] / Roo / bootstrap / NavItem.js
index c5cec6d..32654fb 100644 (file)
@@ -138,7 +138,7 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
        }
        
         var ret = Roo.bootstrap.NavItem.superclass.onRender.call(this, ct, position);
-       this.navLink = this.el.select('nav-link').first();
+       this.navLink = this.el.select('.nav-link',true).first();
        return ret;
     },
       
@@ -248,8 +248,8 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component,  {
         } else if (!this.el.hasClass('active')) {
            
             this.el.addClass('active');
-           if (Roo.bootstrap.version == 4) {
-               this.navLink ? this.navLink.addClass('active') : false;
+           if (Roo.bootstrap.version == 4 && this.navLink ) {
+               this.navLink.addClass('active');
            }
            
         }