codePreviews: fix filename

This commit is contained in:
Cynthia Foxwell 2024-06-01 22:35:42 -06:00
parent f2e62ecf44
commit 76ed5b74af
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ async function processFile(
const urlObj = new URL(link);
let fileName = decodeURIComponent(urlObj.pathname).substring(
link.lastIndexOf("/") + 1
urlObj.pathname.lastIndexOf("/") + 1,
urlObj.pathname.length
);
const fileType =
fileName.lastIndexOf(".") == -1