src/js/build-html.js
function removeCollapsedFromParents (element) {
    if (element.className.indexOf(options.collapsibleClass) !== -1 && element.className.indexOf(options.isCollapsedClass) !== -1) {
      element.className = element.className.split(SPACE_CHAR + options.isCollapsedClass).join('')
      return removeCollapsedFromParents(element.parentNode.parentNode)
    }
    return element
  }
function removeCollapsedFromParents (element) {
    if (element.className.indexOf(options.collapsibleClass) !== -1 && element.className.indexOf(options.isCollapsedClass) !== -1) {
      element.className = element.className.split(SPACE_CHAR + options.isCollapsedClass).join('')
      return removeCollapsedFromParents(element.parentNode.parentNode)
    }
    return element
  }
function removeCollapsedFromParents ( element ) { if ( element . className . indexOf ( options . collapsibleClass ) !== - 1 && element . className . indexOf ( options . isCollapsedClass ) !== - 1 ) { element . className = element . className . split ( SPACE_CHAR + options . isCollapsedClass ) . join ( '' ) return removeCollapsedFromParents ( element . parentNode . parentNode ) } return element }
Remove collpased class from parent elements.
@param {HTMLElement} element
@return {HTMLElement}
Remove collpased class from parent elements .