]> git.parisson.com Git - pdf.js.git/commitdiff
Added default value for no annotations
authorsbarman <sbarman@L3CWZ5T.(none)>
Fri, 19 Aug 2011 18:24:12 +0000 (11:24 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Fri, 19 Aug 2011 18:24:12 +0000 (11:24 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index 63aefcd3285531ff6359d6c38c69a77439a3c3ab..b8193a1384d5b6027dc09f65e2a0256c3050d4e2 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -3342,7 +3342,7 @@ var Page = (function() {
     },
     getLinks: function() {
       var xref = this.xref;
-      var annotations = xref.fetchIfRef(this.annotations);
+      var annotations = xref.fetchIfRef(this.annotations) || [];
       var i, n = annotations.length;
       var links = [];
       for (i = 0; i < n; ++i) {