diff --git a/static/js/getTextFromFile.js b/static/js/getTextFromFile.js index 6c6850ef..48da135c 100644 --- a/static/js/getTextFromFile.js +++ b/static/js/getTextFromFile.js @@ -10,7 +10,11 @@ var fileCache = function () { _cache = fileCache(); function getTextFromFileUrl(url,header={}) { - return _cache[url]; + if (url in _cache) { + return _cache[url]; + } else { + return async () => {await getTextFromFileUrlAsync(url)}; + } }