diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index 04078cf2f7e..e767bbab468 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -1343,19 +1343,12 @@ * @return {Number} Line width */ getLineWidth: function(lineIndex) { - if (this.__lineWidths[lineIndex]) { + if (this.__lineWidths[lineIndex] !== undefined) { return this.__lineWidths[lineIndex]; } - var width, line = this._textLines[lineIndex], lineInfo; - - if (line === '') { - width = 0; - } - else { - lineInfo = this.measureLine(lineIndex); - width = lineInfo.width; - } + var lineInfo = this.measureLine(lineIndex); + var width = lineInfo.width; this.__lineWidths[lineIndex] = width; return width; },