From dbf43bbe601a9ab559230cda3c0f0bdb8af433aa Mon Sep 17 00:00:00 2001 From: Kevin Kwok Date: Fri, 7 Oct 2016 23:25:17 -0400 Subject: [PATCH] update dist --- dist/tesseract.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/tesseract.js b/dist/tesseract.js index 6c458ed..942fbcc 100644 --- a/dist/tesseract.js +++ b/dist/tesseract.js @@ -174,8 +174,13 @@ var TesseractWorker = function () { var _this = this; return this._delay(function (job) { - options = options || {}; - options.lang = options.lang || 'eng'; + if (typeof options === 'string') { + options = { lang: options }; + } else { + options = options || {}; + options.lang = options.lang || 'eng'; + } + job._send('recognize', { image: image, options: options, workerOptions: _this.workerOptions }); }); }