[Pkg-javascript-commits] [pdf.js] 61/72: Fix the node getinfo.js example

David Prévot taffit at moszumanska.debian.org
Wed Mar 18 20:16:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit d762cad42091731bf8a4074374e222683c86df15
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Tue Mar 17 14:26:58 2015 +0100

    Fix the node getinfo.js example
    
    This broke in PR 5366.
---
 src/display/font_loader.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/display/font_loader.js b/src/display/font_loader.js
index 5d89fd8..76b4f24 100644
--- a/src/display/font_loader.js
+++ b/src/display/font_loader.js
@@ -105,7 +105,8 @@ var FontLoader = {
 
   nativeFontFaces: [],
 
-  isFontLoadingAPISupported: !isWorker && !!document.fonts,
+  isFontLoadingAPISupported: (!isWorker && typeof document !== 'undefined' &&
+                              !!document.fonts),
 
   addNativeFontFace: function fontLoader_addNativeFontFace(nativeFontFace) {
     this.nativeFontFaces.push(nativeFontFace);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list