codePreviews: fix filename
This commit is contained in:
parent
f2e62ecf44
commit
76ed5b74af
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue