Skip to content

Commit 00dbce6

Browse files
author
Alex Kwiatkowski & Daniel Yankowsky
committed
Skip properties inherited from array.prototype
1 parent 81bae99 commit 00dbce6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/fonts.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,14 +2773,16 @@ var Font = (function FontClosure() {
27732773
}
27742774
}
27752775
for (var index in newGlyphUnicodes) {
2776-
var unicode = newGlyphUnicodes[index];
2777-
if (reverseMap[unicode]) {
2778-
// avoiding assigning to the same unicode
2779-
glyphs[index].unicode = unusedUnicode++;
2780-
continue;
2776+
if (newGlyphUnicodes.hasOwnProperty(index)) {
2777+
var unicode = newGlyphUnicodes[index];
2778+
if (reverseMap[unicode]) {
2779+
// avoiding assigning to the same unicode
2780+
glyphs[index].unicode = unusedUnicode++;
2781+
continue;
2782+
}
2783+
glyphs[index].unicode = unicode;
2784+
reverseMap[unicode] = index;
27812785
}
2782-
glyphs[index].unicode = unicode;
2783-
reverseMap[unicode] = index;
27842786
}
27852787
this.useToFontChar = true;
27862788
}

0 commit comments

Comments
 (0)