From b29dc7c49ed7f532d09f1186e93c7d8a7a5efd9a Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 21 Feb 2013 10:51:54 +0400 Subject: [PATCH] fix undefined errors when there is no tabstop cell --- lib/ace/elastic_tabstops_lite.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ace/elastic_tabstops_lite.js b/lib/ace/elastic_tabstops_lite.js index efbe7882..c2ed9285 100644 --- a/lib/ace/elastic_tabstops_lite.js +++ b/lib/ace/elastic_tabstops_lite.js @@ -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;