FGRibreau / node-language-detect

🇫🇷 NodeJS language detection library using n-gram
http://blog.fgribreau.com/2011/07/week-end-project-nodejs-language.html
MIT License
397 stars 45 forks source link

Fixed bug when using limit on detect and specifying languageType #20

Closed areggiori closed 10 years ago

areggiori commented 10 years ago

While testing your module with the limit option I encountered a problem when the languageType was set, returning the following error:

Cannot read property '0' of undefined

Here is a patch for the above.

RuslanZavacky commented 10 years ago

Thanks!