Skip to content

Commit

Permalink
better unshift
Browse files Browse the repository at this point in the history
  • Loading branch information
esimkowitz committed Feb 22, 2025
1 parent 8fc10d9 commit 7aef341
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions frontend/app/view/preview/directorypreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -790,16 +790,13 @@ function DirectoryPreview({ model }: DirectoryPreviewProps) {
null
);
entries = file.entries ?? [];
entries = [
{
name: "..",
path: file?.info?.dir,
isdir: true,
modtime: new Date().getTime(),
mimetype: "directory",
},
...entries,
];
entries.unshift({
name: "..",
path: file?.info?.dir,
isdir: true,
modtime: new Date().getTime(),
mimetype: "directory",
});
} catch (e) {
setErrorMsg({
status: "Cannot Read Directory",
Expand Down

0 comments on commit 7aef341

Please sign in to comment.