]> git.parisson.com Git - pdf.js.git/commitdiff
Skip properties inherited from array.prototype
authorAlex Kwiatkowski & Daniel Yankowsky <alexk+daniel@pivotallabs.com>
Wed, 11 Jul 2012 15:45:28 +0000 (11:45 -0400)
committerAlex Kwiatkowski & Daniel Yankowsky <alexk+daniel@pivotallabs.com>
Wed, 11 Jul 2012 15:45:28 +0000 (11:45 -0400)
src/fonts.js

index fd5c72dd21badb98428d7adb2ba07db5da2bbb3b..c955c4d1a2cef20c047459d606cd8a3493600243 100644 (file)
@@ -2773,14 +2773,16 @@ var Font = (function FontClosure() {
             }
           }
           for (var index in newGlyphUnicodes) {
-            var unicode = newGlyphUnicodes[index];
-            if (reverseMap[unicode]) {
-              // avoiding assigning to the same unicode
-              glyphs[index].unicode = unusedUnicode++;
-              continue;
+            if (newGlyphUnicodes.hasOwnProperty(index)) {
+              var unicode = newGlyphUnicodes[index];
+              if (reverseMap[unicode]) {
+                // avoiding assigning to the same unicode
+                glyphs[index].unicode = unusedUnicode++;
+                continue;
+              }
+              glyphs[index].unicode = unicode;
+              reverseMap[unicode] = index;
             }
-            glyphs[index].unicode = unicode;
-            reverseMap[unicode] = index;
           }
           this.useToFontChar = true;
         }