1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #10828: Fix error when canceling bulk PDF export (#10839)

This commit is contained in:
Henry Heino 2024-08-08 12:00:19 -07:00 committed by GitHub
parent af7e172438
commit 0caecedb8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,7 @@ import shim from '@joplin/lib/shim';
import InteropServiceHelper from '../../../InteropServiceHelper';
import { _ } from '@joplin/lib/locale';
import Note from '@joplin/lib/models/Note';
const bridge = require('@electron/remote').require('./bridge').default;
import bridge from '../../../services/bridge';
export const declaration: CommandDeclaration = {
name: 'exportPdf',
@ -31,6 +31,14 @@ export const runtime = (comp: any): CommandRuntime => {
});
}
if (Array.isArray(path)) {
if (path.length > 1) {
throw new Error('Only one output directory can be selected');
}
path = path[0];
}
if (!path) return;
for (let i = 0; i < noteIds.length; i++) {