diff --git a/src/lib/readLocalMarkdownFileToObject.ts b/src/lib/readLocalMarkdownFileToObject.ts index cc50993..466afee 100644 --- a/src/lib/readLocalMarkdownFileToObject.ts +++ b/src/lib/readLocalMarkdownFileToObject.ts @@ -27,12 +27,11 @@ export function readLocalMarkdownFileToObject( links: [], }; - // if not md or mdx return this - const isExtensionNotSupported = - !MddbFile.supportedExtensions.includes(extension); - if (isExtensionNotSupported) { - return fileObject; - } +const isExtensionSupported = MddbFile.supportedExtensions.includes(extension); + +if (!isExtensionSupported) { + return fileObject; +} // url_path const pathRelativeToFolder = path.relative(folderPath, filePath);