Comparing version 0.1.23 to 0.1.24
@@ -611,2 +611,15 @@ "use strict"; | ||
var fontPromises = []; | ||
var _loop = function _loop(fontFace) { | ||
if (fontFace.status !== "loaded") { | ||
var fontLoaded = fontFace.load().then(function (r) { | ||
return fontFace.family; | ||
}, function (r) { | ||
console.warn("Failed to preload font-family:", fontFace.family); | ||
return fontFace.family; | ||
}); | ||
fontPromises.push(fontLoaded); | ||
} | ||
}; | ||
var _iteratorNormalCompletion = true; | ||
@@ -620,5 +633,3 @@ var _didIteratorError = false; | ||
if (fontFace.status !== "loaded") { | ||
fontPromises.push(fontFace.load()); | ||
} | ||
_loop(fontFace); | ||
} | ||
@@ -640,3 +651,5 @@ } catch (err) { | ||
return _promise2.default.all(fontPromises); | ||
return _promise2.default.all(fontPromises).catch(function (err) { | ||
console.warn(err); | ||
}); | ||
} | ||
@@ -643,0 +656,0 @@ }, { |
{ | ||
"name": "pagedjs", | ||
"version": "0.1.23", | ||
"version": "0.1.24", | ||
"description": "Chunks up a document into paged media flows and applies print styles", | ||
@@ -5,0 +5,0 @@ "author": "Fred Chasen", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3538267
49
113873
7