Remove unneeded dirent conversion
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
057c2c2a03
commit
b32fd53d95
|
@ -58,12 +58,7 @@ export async function getEventsByTerm(
|
|||
year: string,
|
||||
term: string
|
||||
): Promise<string[]> {
|
||||
return (
|
||||
await fs.readdir(path.join(EVENTS_PATH, year, term), {
|
||||
withFileTypes: true,
|
||||
})
|
||||
)
|
||||
.map((dirent) => dirent.name)
|
||||
return (await fs.readdir(path.join(EVENTS_PATH, year, term)))
|
||||
.filter((name) => name.endsWith(".md"))
|
||||
.map((name) => name.slice(0, -".md".length));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue