Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Saira-A committed Sep 24, 2024
1 parent 35825f0 commit 1584ccc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export class ContentLeftPanel extends LeftPanel<ContentLeftPanelConfig> {
if (!treeData) {
return;
}
if (!this.defaultToThumbsView() || this.extension.helper.treeHasNavDates(treeData)) {
if (!this.defaultToThumbsView()) {
this.$treeViewOptions.show();
} else {
this.$treeViewOptions.hide();
Expand Down Expand Up @@ -617,10 +617,10 @@ export class ContentLeftPanel extends LeftPanel<ContentLeftPanelConfig> {
false
);

const treeData: TreeNode | null = this.getTree()
const treeData: TreeNode | null = this.getTree();

if (defaultToTreeIfCollection && this.isCollection()) {
return false; // Default to tree view if the manifest is a collection
if (this.isCollection() && (defaultToTreeIfCollection || (treeData && this.extension.helper.treeHasNavDates(treeData)))) {
return false;
}

if (defaultToTreeEnabled) {
Expand Down

0 comments on commit 1584ccc

Please sign in to comment.