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

Commit

Permalink
fix: media files not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneFreeman committed Nov 17, 2023
1 parent 7a1969b commit 012a427
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/lib/hooks/useMediaFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ export default function useMediaFiles(field?: MediaField, currentFolder?: string
.filter(f => {
if (f.name === '.gitkeep') {
const folder = dirname(f.path);
return dirname(folder) === mediaFolder;
return dirname(folder) === trim(mediaFolder, '/');
}

return dirname(f.path) === mediaFolder;
return dirname(f.path) === trim(mediaFolder, '/');
})
.map(file => {
if (file.name === '.gitkeep') {
Expand Down

0 comments on commit 012a427

Please sign in to comment.