diff --git a/manifest.json b/manifest.json index 1185d3a..ec89d55 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "image-ocr", "name": "Image OCR", - "version": "0.3.7", + "version": "0.3.8", "minAppVersion": "0.15.0", "description": "Runs OCR on images and copies content in image caption.", "author": "kaffarell", diff --git a/package.json b/package.json index 5ca3817..c820225 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "image-ocr", - "version": "0.3.7", + "version": "0.3.8", "description": "Runs ocr on pasted images and posts result in details box. This allows to search in images.", "main": "dist/main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index 6315a74..23fae22 100644 --- a/src/main.ts +++ b/src/main.ts @@ -174,7 +174,8 @@ export default class TesseractOcrPlugin extends Plugin { execution.on('close', () => { if (this.settings.debug == true) console.log('tesseract output: ' + stdout.join('')); if (this.settings.debug == true) console.log('tesseract output: ' + error.join('')); - if (error.length) reject(error.join('')); + // if we don't get any output, reject + if (stdout.join('').length == 0) reject(error.join('')); else resolve(stdout.join('')); }); diff --git a/versions.json b/versions.json index b81aca8..afc5ce5 100644 --- a/versions.json +++ b/versions.json @@ -8,5 +8,6 @@ "0.3.4": "0.15.0", "0.3.5": "0.15.0", "0.3.6": "0.15.0", - "0.3.7": "0.15.0" + "0.3.7": "0.15.0", + "0.3.8": "0.15.0" }