Fixes bug with unfinished filename extension (file.p)
This commit is contained in:
parent
53a0291cc2
commit
d0ce7db9ee
1 changed files with 8 additions and 0 deletions
|
@ -228,8 +228,16 @@ class PdfContainer {
|
||||||
|
|
||||||
const filenameInput = document.getElementById('filename-input');
|
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')) {
|
if (!filenameInput.value.includes('.pdf')) {
|
||||||
filenameInput.value = filenameInput.value + '.pdf';
|
filenameInput.value = filenameInput.value + '.pdf';
|
||||||
|
this.filename = filenameInput.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (downloadOption === 'sameWindow') {
|
if (downloadOption === 'sameWindow') {
|
||||||
|
|
Loading…
Reference in a new issue