Skip to content

Commit

Permalink
Change lang in options to eLang
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadazimi committed Jan 3, 2015
1 parent 7742f3c commit 89df443
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/fontdetect.js
Expand Up @@ -94,7 +94,7 @@ FontDetect = function()
* @param string The font name to check for.
* @param function The function to call if it gets loaded within the timeout period.
* @param options An optional object with named parameters:
* @param eLang Which font language to use. Default = 'en'.
* @param eLang Which font language to use. Default = 'en'.
* @param onFail The function to call if the font doesn't load within the timeout period.
* @param msInterval How many milliseconds for the polling interval. Default = 100.
* @param msTimeout How many milliseconds until we time out & call onFail. Default = 2000.
Expand All @@ -108,7 +108,8 @@ FontDetect = function()
// Our hashtable of optional params.
var msInterval = (p_options && p_options.msInterval) ? p_options.msInterval : 100;
var msTimeout = (p_options && p_options.msTimeout) ? p_options.msTimeout : 2000;
eLang = (p_options && p_options.lang && p_options.lang in aChars) ? p_options.lang : 'en';
// Since the language to use is an enum, check if the language they pass in is defined in aChars.
eLang = (p_options && p_options.eLang && p_options.eLang in aChars) ? p_options.eLang : 'en';

if (!p_onLoad && !p_onFail)
{ // Caller must specify at least one callback.
Expand Down

0 comments on commit 89df443

Please sign in to comment.