From 00dbce612fcff3da8f9774e4b0bb0e465e2aa1c5 Mon Sep 17 00:00:00 2001 From: Alex Kwiatkowski & Daniel Yankowsky Date: Wed, 11 Jul 2012 11:45:28 -0400 Subject: [PATCH] Skip properties inherited from array.prototype --- src/fonts.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/fonts.js b/src/fonts.js index fd5c72dd2..c955c4d1a 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -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; }