Skip to content

Commit

Permalink
fix: branches folder doesnt exist error
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 18, 2024
1 parent dffbe4c commit 71e159b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/app/server/api/branches/index.get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ import { getLocalDbFolder, resourceInstancesFolders } from '@moquerie/core'

export default defineEventHandler(async () => {
const folder = path.join(getLocalDbFolder(getMq()), ...resourceInstancesFolders)
if (!fs.existsSync(folder)) {
return []
}
return fs.promises.readdir(folder)
})

0 comments on commit 71e159b

Please sign in to comment.