diff --git a/nextjs/src/app/course/[courseName]/Day.tsx b/nextjs/src/app/course/[courseName]/Day.tsx
index d461ae4..cd4db52 100644
--- a/nextjs/src/app/course/[courseName]/Day.tsx
+++ b/nextjs/src/app/course/[courseName]/Day.tsx
@@ -1,6 +1,6 @@
export default function Day({ day }: { day?: Date }) {
const classes = "border rounded rounded-3 p-2 pb-4 m-1 ";
- if (!day) return
d
;
+ if (!day) return ;
return {day.getDate()}
;
}
diff --git a/nextjs/src/services/fileStorage/utils/couresMarkdownLoader.ts b/nextjs/src/services/fileStorage/utils/couresMarkdownLoader.ts
index 40a83c5..f8b01d0 100644
--- a/nextjs/src/services/fileStorage/utils/couresMarkdownLoader.ts
+++ b/nextjs/src/services/fileStorage/utils/couresMarkdownLoader.ts
@@ -185,8 +185,8 @@ export const courseMarkdownLoader = {
async directoryExists(directoryPath: string): Promise {
try {
- const stat = await fs.stat(directoryPath);
- return stat.isDirectory();
+ await fs.access(directoryPath);
+ return true;
} catch {
return false;
}
diff --git a/nextjs/src/services/fileStorage/utils/courseMarkdownSaver.ts b/nextjs/src/services/fileStorage/utils/courseMarkdownSaver.ts
index 1f79e02..b66f138 100644
--- a/nextjs/src/services/fileStorage/utils/courseMarkdownSaver.ts
+++ b/nextjs/src/services/fileStorage/utils/courseMarkdownSaver.ts
@@ -10,8 +10,8 @@ const basePath = process.env.STORAGE_DIRECTORY ?? "./storage";
const directoryExists = async (directoryPath: string): Promise => {
try {
- const stat = await fs.stat(directoryPath);
- return stat.isDirectory();
+ await fs.access(directoryPath);
+ return true;
} catch {
return false;
}