From f30056fa8100e99329fd14dfd048e7f7f79555a0 Mon Sep 17 00:00:00 2001 From: hybridherbst Date: Sun, 21 Apr 2024 00:38:26 +0200 Subject: [PATCH] cleanup --- web/src/routes/(assets)/[...path]/+page.server.ts | 2 +- web/src/viewer | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/routes/(assets)/[...path]/+page.server.ts b/web/src/routes/(assets)/[...path]/+page.server.ts index 124aff17..0dc0f190 100644 --- a/web/src/routes/(assets)/[...path]/+page.server.ts +++ b/web/src/routes/(assets)/[...path]/+page.server.ts @@ -45,7 +45,7 @@ export async function load({ params }) { let currentItem = items?.find(item => item.path === _path || item.path + "/" === _path); // fall back to first item if we have a directory with only one item - currentItem = currentItem || (currentDir?.items.length == 1 ? currentDir.items[0] : undefined); + currentItem = currentItem || (currentDir?.items.length == 1 && currentDir?.children.length == 0 ? currentDir.items[0] : undefined); // console.log("Loading page: " + path + ", currentDir: " + currentDir + ", currentItem: " + currentItem); diff --git a/web/src/viewer b/web/src/viewer index f50f7170..784d24ed 160000 --- a/web/src/viewer +++ b/web/src/viewer @@ -1 +1 @@ -Subproject commit f50f71707760f099eea14c15ddd0388503453076 +Subproject commit 784d24ed893d9bdacd7842fa1f840df4906dc992