From 240c29c1d9cf6a2adfad8692917d60cde071cce3 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Mon, 13 Jul 2015 22:53:44 -0500 Subject: LibreJS updated to 6.0.9 --- .../web_labels/script_hash_worker.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/resources/librejs/lib/html_script_finder') 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); -- cgit v1.2.3