From fad38f8286acc0a23b10cc95dda800530adaf160 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Tue, 21 Aug 2012 23:14:07 +0300 Subject: [PATCH] Update src/fonts.js One simple thing that came up while looking at the new Octane benchmark. --- src/fonts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fonts.js b/src/fonts.js index f0e1bd4d3..eda67df33 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -4100,7 +4100,7 @@ Type1Font.prototype = { // charstring changes size - can't cache .length in loop for (var i = 0; i < charstring.length; i++) { var command = charstring[i]; - if (command.charAt) { + if (typeof command === 'string') { var cmd = map[command]; assert(cmd, 'Unknow command: ' + command);