mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-09 17:14:16 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89f422b2af | ||
|
|
12753349ec |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "bento-pdf",
|
"name": "bento-pdf",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export async function decrypt() {
|
|||||||
document.getElementById('password-input') as HTMLInputElement
|
document.getElementById('password-input') as HTMLInputElement
|
||||||
)?.value;
|
)?.value;
|
||||||
|
|
||||||
if (!password?.trim()) {
|
if (!password) {
|
||||||
showAlert('Input Required', 'Please enter the PDF password.');
|
showAlert('Input Required', 'Please enter the PDF password.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ export async function decrypt() {
|
|||||||
showLoader('Preparing download...');
|
showLoader('Preparing download...');
|
||||||
const outputFile = qpdf.FS.readFile(outputPath, { encoding: 'binary' });
|
const outputFile = qpdf.FS.readFile(outputPath, { encoding: 'binary' });
|
||||||
|
|
||||||
if (!outputFile || outputFile.length === 0) {
|
if (outputFile.length === 0) {
|
||||||
throw new Error('Decryption resulted in an empty file.');
|
throw new Error('Decryption resulted in an empty file.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ describe('Tool Configuration Arrays', () => {
|
|||||||
|
|
||||||
it('should have the correct number of tools', () => {
|
it('should have the correct number of tools', () => {
|
||||||
// This acts as a snapshot test to catch unexpected additions/removals.
|
// This acts as a snapshot test to catch unexpected additions/removals.
|
||||||
expect(singlePdfLoadTools).toHaveLength(40);
|
expect(singlePdfLoadTools).toHaveLength(41);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not contain any duplicate tools', () => {
|
it('should not contain any duplicate tools', () => {
|
||||||
|
|||||||
Reference in new issue
Block a user