fixing an overzealous access in the rewriter

This commit is contained in:
Jeremy Ashkenas
2010-02-16 10:12:40 -05:00
parent 79fa4723ab
commit 51e80484e2
3 changed files with 6 additions and 2 deletions

View File

@@ -94,7 +94,7 @@
this.tokens.splice(i + 2, 1);
this.tokens.splice(i - 2, 1);
return 0;
} else if (prev && prev[0] === 'TERMINATOR' && after[0] === 'INDENT') {
} else if (prev && prev[0] === 'TERMINATOR' && after && after[0] === 'INDENT') {
this.tokens.splice(i + 2, 1);
this.tokens[i - 1] = after;
return 1;