fix(randomiseFileNames): work correctly on web (#40)
* fix(randomiseFileNames): work correctly on web * fix the fix
This commit is contained in:
parent
e1027e06c1
commit
c5e0c7a6e7
1 changed files with 1 additions and 1 deletions
|
@ -23,6 +23,6 @@ export default definePlugin({
|
|||
{ length: 7 },
|
||||
() => chars[Math.floor(Math.random() * chars.length)]
|
||||
).join("");
|
||||
return rand + window.DiscordNative.fileManager.extname(file);
|
||||
return rand + (file.lastIndexOf(".") > -1 ? file.slice(file.lastIndexOf(".")) : "")
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue