codePreviews: fix filename

This commit is contained in:
Cynthia Foxwell 2024-06-01 22:35:42 -06:00
parent f2e62ecf44
commit 76ed5b74af

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