Skip to content

Commit

Permalink
empty lines need to have a correct struct to be serialized
Browse files Browse the repository at this point in the history
  • Loading branch information
jedi4ever committed May 6, 2013
1 parent 230580e commit 0e79b72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ this.inject = function(str) {
if (thisBuffer.length < otherBuffer.length) {
// We need to add the extra lines
for(var i = thisBuffer.length ; i < otherBuffer.length; i++) {
diff.push({action: 'add', type: 'line', data: {lineNumber: i, line: otherBuffer[i]}});
var otherLine = otherBuffer[i] || emptyLine;
diff.push({action: 'add', type: 'line', data: {lineNumber: i, line: otherLine}});
}
}

Expand Down

0 comments on commit 0e79b72

Please sign in to comment.