function updateTabs() {
        // Probe tabs
        var tabs = this.getTabs(); // Find *last* active non-disabled tab in current tabs
        // We trust tab state over currentTab, in case tabs were added/removed/re-ordered

        var tabIndex = tabs.indexOf(tabs.slice().reverse().find(function (tab) {
          return tab.localActive && !tab.disabled;
        })); // Else try setting to currentTab

        if (tabIndex < 0) {
          var currentTab = this.currentTab;

          if (currentTab >= tabs.length) {
            // Handle last tab being removed, so find the last non-disabled tab
            tabIndex = tabs.indexOf(tabs.slice().reverse().find(notDisabled));
          } else if (tabs[currentTab] && !tabs[currentTab].disabled) {
            // Current tab is not disabled
            tabIndex = currentTab;
          }
        } // Else find *first* non-disabled tab in current tabs


        if (tabIndex < 0) {
          tabIndex = tabs.indexOf(tabs.find(notDisabled));
        } // Set the current tab state to active


        tabs.forEach(function (tab, idx) {
          // tab.localActive = idx === tabIndex && !tab.disabled
          tab.localActive = false;
        });

        if (tabs[tabIndex]) {
          tabs[tabIndex].localActive = true;
        } // Update the array of tab children


        this.tabs = tabs; // Set the currentTab index (can be -1 if no non-disabled tabs)

        this.currentTab = tabIndex;
      }
// Update list of b-tab children
Update list of b-tab children
Update list of b - tab children
function updateTabs() {
        var tabs = this.getTabs(); 
        var tabIndex = tabs.indexOf(tabs.slice().reverse().find(function (tab) {
          return tab.localActive && !tab.disabled;
        })); 
        if (tabIndex < 0) {
          var currentTab = this.currentTab;
          if (currentTab >= tabs.length) {
            tabIndex = tabs.indexOf(tabs.slice().reverse().find(notDisabled));
          } else if (tabs[currentTab] && !tabs[currentTab].disabled) {
            tabIndex = currentTab;
          }
        } 
        if (tabIndex < 0) {
          tabIndex = tabs.indexOf(tabs.find(notDisabled));
        } 
        tabs.forEach(function (tab, idx) {
          tab.localActive = false;
        });
        if (tabs[tabIndex]) {
          tabs[tabIndex].localActive = true;
        } 
        this.tabs = tabs; 
        this.currentTab = tabIndex;
      }
function updateTabs ( ) { var tabs = this . getTabs ( ) ; var tabIndex = tabs . indexOf ( tabs . slice ( ) . reverse ( ) . find ( function ( tab ) { return tab . localActive && ! tab . disabled ; } ) ) ; if ( tabIndex < 0 ) { var currentTab = this . currentTab ; if ( currentTab >= tabs . length ) { tabIndex = tabs . indexOf ( tabs . slice ( ) . reverse ( ) . find ( notDisabled ) ) ; } else if ( tabs [ currentTab ] && ! tabs [ currentTab ] . disabled ) { tabIndex = currentTab ; } } if ( tabIndex < 0 ) { tabIndex = tabs . indexOf ( tabs . find ( notDisabled ) ) ; } tabs . forEach ( function ( tab , idx ) { tab . localActive = false ; } ) ; if ( tabs [ tabIndex ] ) { tabs [ tabIndex ] . localActive = true ; } this . tabs = tabs ; this . currentTab = tabIndex ; }
Update list of b-tab children
Update list of b - tab children
// Probe tabs // Find *last* active non-disabled tab in current tabs // We trust tab state over currentTab, in case tabs were added/removed/re-ordered // Else try setting to currentTab // Handle last tab being removed, so find the last non-disabled tab // Current tab is not disabled // Else find *first* non-disabled tab in current tabs // Set the current tab state to active // tab.localActive = idx === tabIndex && !tab.disabled // Update the array of tab children // Set the currentTab index (can be -1 if no non-disabled tabs)