fix undefined errors when there is no tabstop cell

This commit is contained in:
nightwing 2013-02-21 10:51:54 +04:00
commit b29dc7c49e

View file

@ -150,6 +150,10 @@ var ElasticTabstopsLite = function(editor) {
for (var c = 0, l = columnInfo.length; c < l; c++) {
var column = columnInfo[c];
if (!column.push) {
console.error(column)
continue
}
// add an extra None to the end so that the end of the column automatically
// finishes a block
column.push(NaN);
@ -248,6 +252,8 @@ var ElasticTabstopsLite = function(editor) {
// the is a (naive) Python port--but works for these purposes
this.$izip_longest = function(iterables) {
if (!iterables[0])
return console.error(iterables);
var longest = iterables[0].length;
var iterablesLength = iterables.length;