function getInheritTheme(theme, tree = {}) {
  if (!app.locals.themes[theme]) {
    // this theme is not installed
    app.error('requested theme:%s but it is not installed', theme);
    return tree;
  }

  // add the one been requested
  tree[theme] = {};

  // get inheritance
  var config = app.locals.themes[theme].zealderConfig;
  if (config && config.themeDependency && !tree[config.themeDependency]) {
    tree = getInheritTheme(config.themeDependency, tree);
  }

  return tree;
}
function getInheritTheme(theme, tree = {}) {
  if (!app.locals.themes[theme]) {
    
    app.error('requested theme:%s but it is not installed', theme);
    return tree;
  }

  
  tree[theme] = {};

  
  var config = app.locals.themes[theme].zealderConfig;
  if (config && config.themeDependency && !tree[config.themeDependency]) {
    tree = getInheritTheme(config.themeDependency, tree);
  }

  return tree;
}
function getInheritTheme ( theme , tree = { } ) { if ( ! app . locals . themes [ theme ] ) { // this theme is not installed app . error ( 'requested theme:%s but it is not installed' , theme ) ; return tree ; } // add the one been requested tree [ theme ] = { } ; // get inheritance var config = app . locals . themes [ theme ] . zealderConfig ; if ( config && config . themeDependency && ! tree [ config . themeDependency ] ) { tree = getInheritTheme ( config . themeDependency , tree ) ; } return tree ; }
get theme inheritance
get theme inheritance