diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2015-07-13 22:53:44 -0500 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2015-07-13 22:53:44 -0500 |
commit | 240c29c1d9cf6a2adfad8692917d60cde071cce3 (patch) | |
tree | 437c262a88e805a9dd3d381e0e46b77bd286b1eb /data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder | |
parent | 23103d7773e24fdf15b79ed69c67089b593fb31a (diff) |
LibreJS updated to 6.0.9
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder')
-rw-r--r-- | data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/script_hash_worker.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/script_hash_worker.js b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/script_hash_worker.js index a8b2fdb..92ffb82 100644 --- a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/script_hash_worker.js +++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder/web_labels/script_hash_worker.js @@ -49,15 +49,28 @@ exports.addToCache = function (lic, delay, jsWebLabelsURL, callback) { lic.fileUrl ); console.debug('returning xhr from', lic.fileUrl); - callback(lic.fileUrl); + if (typeof callback === 'function') { + callback(lic.fileUrl); + } else { + console.debug('callback is not a function:', callback); + } } catch (e) { - callback(lic.fileUrl); + if (typeof callback === 'function') { + callback(lic.fileUrl); + } else { + console.debug('callback is not a function:', callback); + } } }; // just callback after 5 seconds if we don't get the answer yet. timers.setTimeout(function() { cb = function() {}; - callback(lic.fileUrl); }, 20000); + if (typeof callback === 'function') { + callback(lic.fileUrl); + } else { + console.debug('callback is not a function:', callback); + } + }, 20000); xhr({'url': lic.fileUrl}, cb); }, delay); |