From: sbarman Date: Fri, 19 Aug 2011 18:24:12 +0000 (-0700) Subject: Added default value for no annotations X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a67c63db131d215c78c8ecab5528d6629b6a8492;p=pdf.js.git Added default value for no annotations --- diff --git a/pdf.js b/pdf.js index 63aefcd..b8193a1 100644 --- 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) {