Commit 9e6956ef authored by nanahira's avatar nanahira

fix

parent c3238bf8
...@@ -403,7 +403,7 @@ if settings.modules.challonge.enabled ...@@ -403,7 +403,7 @@ if settings.modules.challonge.enabled
replaced_index = (challonge_type) -> replaced_index = (challonge_type) ->
return (_data) -> return (_data) ->
resolve_data = new ResolveData(_data.callback) resolve_data = new ResolveData(_data.callback)
if settings.modules.challonge.cache_ttl and !_data.no_cache and challonge_cache[0] if settings.modules.challonge.cache_ttl and !_data.no_cache and challonge_cache[challonge_type]
resolve_data.resolve(null, challonge_cache[challonge_type]) resolve_data.resolve(null, challonge_cache[challonge_type])
else if is_challonge_requesting[challonge_type] and moment() - is_challonge_requesting[challonge_type] <= 5000 else if is_challonge_requesting[challonge_type] and moment() - is_challonge_requesting[challonge_type] <= 5000
challonge_queue_callbacks[challonge_type].push(resolve_data) challonge_queue_callbacks[challonge_type].push(resolve_data)
......
...@@ -523,7 +523,7 @@ ...@@ -523,7 +523,7 @@
return function(_data) { return function(_data) {
var err, resolve_data; var err, resolve_data;
resolve_data = new ResolveData(_data.callback); resolve_data = new ResolveData(_data.callback);
if (settings.modules.challonge.cache_ttl && !_data.no_cache && challonge_cache[0]) { if (settings.modules.challonge.cache_ttl && !_data.no_cache && challonge_cache[challonge_type]) {
resolve_data.resolve(null, challonge_cache[challonge_type]); resolve_data.resolve(null, challonge_cache[challonge_type]);
} else if (is_challonge_requesting[challonge_type] && moment() - is_challonge_requesting[challonge_type] <= 5000) { } else if (is_challonge_requesting[challonge_type] && moment() - is_challonge_requesting[challonge_type] <= 5000) {
challonge_queue_callbacks[challonge_type].push(resolve_data); challonge_queue_callbacks[challonge_type].push(resolve_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment