Skip to content

Commit

Permalink
fix(bidihandler): check for undefined before access length property o…
Browse files Browse the repository at this point in the history
…n `splits` variable
  • Loading branch information
dntrkv committed Jul 7, 2022
1 parent e9331bf commit 457b657
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ace/bidihandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ var BidiHandler = function(session) {
} else {
this.line = this.line.substring(0, splits[splitIndex]);
}

if (splitIndex == splits.length) {
this.line += (this.showInvisibles) ? endOfLine : bidiUtil.DOT;
}
}
if (splitIndex == splits.length)
this.line += (this.showInvisibles) ? endOfLine : bidiUtil.DOT;
} else {
this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT;
}
Expand Down

0 comments on commit 457b657

Please sign in to comment.