1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-04 15:00:14 +01:00

Fixes bug with unfinished filename extension (file.p)

This commit is contained in:
Dimitrios Kaitantzidis 2023-10-15 18:35:39 +03:00
parent 53a0291cc2
commit d0ce7db9ee

View File

@ -228,8 +228,16 @@ class PdfContainer {
const filenameInput = document.getElementById('filename-input');
let inputArr = filenameInput.value.split('.');
if (inputArr !== null && inputArr !== undefined && inputArr.length > 0) {
filenameInput.value = inputArr[0];
this.filename = filenameInput.value;
}
if (!filenameInput.value.includes('.pdf')) {
filenameInput.value = filenameInput.value + '.pdf';
this.filename = filenameInput.value;
}
if (downloadOption === 'sameWindow') {