From 090d0c786e47a28c403cfee105439bad87724974 Mon Sep 17 00:00:00 2001
From: Kevin Kwok <antimatter15@gmail.com>
Date: Fri, 7 Oct 2016 23:25:06 -0400
Subject: [PATCH] undocument languiches

---
 src/index.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/index.js b/src/index.js
index 4ad33575d..9bf283036 100644
--- a/src/index.js
+++ b/src/index.js
@@ -18,8 +18,13 @@ class TesseractWorker {
 
 	recognize(image, options){
 		return this._delay(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 })
 		})
 	}