Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Apr 26, 2024
1 parent 638cb17 commit f30056f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/routes/(assets)/[...path]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion web/src/viewer

0 comments on commit f30056f

Please sign in to comment.