Skip to content

Commit

Permalink
Update src/lib/readLocalMarkdownFileToObject.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Ola Rubaj <[email protected]>
  • Loading branch information
mohamedsalem401 and olayway authored Nov 15, 2023
1 parent 1f33626 commit 1655f74
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/lib/readLocalMarkdownFileToObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1655f74

Please sign in to comment.