diff --git a/apps/server/src/integrations/import/services/file-import-task.service.ts b/apps/server/src/integrations/import/services/file-import-task.service.ts index 0e7773cd..5cf39054 100644 --- a/apps/server/src/integrations/import/services/file-import-task.service.ts +++ b/apps/server/src/integrations/import/services/file-import-task.service.ts @@ -212,7 +212,10 @@ export class FileImportTaskService { // For each folder with content, create a placeholder page if no corresponding .md or .html exists foldersWithContent.forEach((folderPath) => { - if (folderPath.toLowerCase() === skipRootFolder.toLowerCase()) { + if ( + skipRootFolder && + folderPath?.toLowerCase() === skipRootFolder?.toLowerCase() + ) { return; }