diff --git a/src/Renderer.js b/src/Renderer.js index 949da978d..0663a1239 100644 --- a/src/Renderer.js +++ b/src/Renderer.js @@ -27,7 +27,7 @@ const findFont = (fonts, requiredFonts, defaultFont) => { * @returns {number} */ const offsetText = (y, inline) => { - var newY = y; + let newY = y; if (inline.sup) { newY -= inline.fontSize * 0.75; } diff --git a/src/SVGMeasure.js b/src/SVGMeasure.js index 3d04d8dac..0834d0d45 100644 --- a/src/SVGMeasure.js +++ b/src/SVGMeasure.js @@ -7,7 +7,7 @@ import xmldoc from 'xmldoc'; * @returns {?number} */ const stripUnits = textVal => { - var n = parseFloat(textVal); + let n = parseFloat(textVal); if (typeof n !== 'number' || isNaN(n)) { return undefined; } @@ -21,7 +21,7 @@ const stripUnits = textVal => { * @returns {object} */ const parseSVG = (svgString) => { - var doc; + let doc; try { doc = new xmldoc.XmlDocument(svgString); diff --git a/src/TextInlines.js b/src/TextInlines.js index a3aa2fecf..878db5a0a 100644 --- a/src/TextInlines.js +++ b/src/TextInlines.js @@ -45,7 +45,7 @@ class TextInlines { * Converts an array of strings (or inline-definition-objects) into a collection * of inlines and calculated minWidth/maxWidth and their min/max widths * - * @param {Array} textArray an array of inline-definition-objects (or strings) + * @param {Array|object} textArray an array of inline-definition-objects (or strings) * @param {StyleContextStack} styleContextStack current style stack * @returns {object} collection of inlines, minWidth, maxWidth */