]> git.parisson.com Git - pdf.js.git/commitdiff
Fixes "invalid 'in' operand destKind"
authornotmasteryet <async.processingjs@yahoo.com>
Sat, 18 Feb 2012 00:40:56 +0000 (18:40 -0600)
committernotmasteryet <async.processingjs@yahoo.com>
Sat, 18 Feb 2012 00:40:56 +0000 (18:40 -0600)
web/viewer.js

index e8533bd597a0ee74fec5491d4fc97f8c6c2e7033..2fb16b8cf5486e516e1d418e67a35a3a1ca737fd 100644 (file)
@@ -320,7 +320,8 @@ var PDFView = {
       if (pageNumber) {
         var pdfOpenParams = PDFView.getAnchorUrl('#page=' + pageNumber);
         var destKind = dest[1];
-        if ('name' in destKind && destKind.name == 'XYZ') {
+        if (typeof destKind === 'object' && 'name' in destKind &&
+            destKind.name == 'XYZ') {
           var scale = (dest[4] || this.currentScale);
           pdfOpenParams += '&zoom=' + (scale * 100);
           if (dest[2] || dest[3]) {