Merge pull request #474 from Tyriar/473_refresh_null_checks

Add null checks to refresh line and character fetches
This commit is contained in:
Daniel Imms
2017-01-13 07:09:12 -08:00
committed by GitHub
+8
View File
@@ -1139,6 +1139,10 @@ Terminal.prototype.refresh = function(start, end) {
row = y + this.ydisp;
line = this.lines.get(row);
if (!line || !this.children[y]) {
// Continue if the line is not available, this means a resize is currently in progress
continue;
}
out = '';
if (this.y === y - (this.ybase - this.ydisp)
@@ -1153,6 +1157,10 @@ Terminal.prototype.refresh = function(start, end) {
i = 0;
for (; i < width; i++) {
if (!line[i]) {
// Continue if the character is not available, this means a resize is currently in progress
continue;
}
data = line[i][0];
ch = line[i][1];
ch_width = line[i][2];