Skip to content

Commit

Permalink
Fix what appear to be bugs in some of the text cache checks
Browse files Browse the repository at this point in the history
  • Loading branch information
avrami-ly committed Nov 18, 2021
1 parent eee20ad commit 71b368e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shapes/text.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -1343,13 +1343,13 @@
* @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 === '') {
if (!line || line.join('') === '') {
width = 0;
}
else {
Expand Down

0 comments on commit 71b368e

Please sign in to comment.