app/assets/javascripts/pdfjs_viewer/pdfjs/l10n.js in pdfjs_viewer-rails-0.0.9 vs app/assets/javascripts/pdfjs_viewer/pdfjs/l10n.js in pdfjs_viewer-rails-0.1.0
- old
+ new
@@ -99,13 +99,11 @@
document.dispatchEvent(evtObject);
}
function xhrLoadText(url, onSuccess, onFailure) {
onSuccess = onSuccess || function _onSuccess(data) {};
- onFailure = onFailure || function _onFailure() {
- console.warn(url + ' not found.');
- };
+ onFailure = onFailure || function _onFailure() {};
var xhr = new XMLHttpRequest();
xhr.open('GET', url, gAsyncResourceLoading);
if (xhr.overrideMimeType) {
xhr.overrideMimeType('text/plain; charset=utf-8');
@@ -242,10 +240,13 @@
// import another *.properties file
function loadImport(url, callback) {
xhrLoadText(url, function(content) {
parseRawLines(content, false, callback); // don't allow recursive imports
- }, null);
+ }, function () {
+ console.warn(url + ' not found.');
+ callback();
+ });
}
// fill the dictionary
parseRawLines(text, true, function() {
parsedPropertiesCallback(dictionary);