From 25bf5db47ea421d476ccadc4d93178e59931ecfd Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 10 Dec 2016 17:01:32 +0100 Subject: [PATCH] Fix errors reported by the `no-extra-boolean-cast` ESLint rule http://eslint.org/docs/rules/no-extra-boolean-cast --- src/core/fonts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/fonts.js b/src/core/fonts.js index de81089b3..6364ba857 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -2943,6 +2943,7 @@ var ErrorFont = (function ErrorFontClosure() { function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { var charCodeToGlyphId = Object.create(null); var glyphId, charCode, baseEncoding; + var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); if (properties.baseEncodingName) { // If a valid base encoding name was used, the mapping is initialized with @@ -2956,9 +2957,8 @@ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { charCodeToGlyphId[charCode] = 0; // notdef } } - } else if (!!(properties.flags & FontFlags.Symbolic)) { - // For a symbolic font the encoding should be the fonts built-in - // encoding. + } else if (isSymbolicFont) { + // For a symbolic font the encoding should be the fonts built-in encoding. for (charCode in builtInEncoding) { charCodeToGlyphId[charCode] = builtInEncoding[charCode]; }