summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-17 13:06:25 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-17 13:06:25 -0800
commit9e5703b6f76b6d26e6b8f46ae3eca239d01bd380 (patch)
tree7b5d945576f385b83ce125f0b2e16b585403b115
parentaf3c456b2495ef930719988fc1bc1848240122ef (diff)
Minor code simplification.
-rw-r--r--js/lib/blocks.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
index b4cf206..8001927 100644
--- a/js/lib/blocks.js
+++ b/js/lib/blocks.js
@@ -143,11 +143,10 @@ var breakOutOfLists = function(block) {
// Add a line to the block at the tip. We assume the tip
// can accept lines -- that check should be done before calling this.
var addLine = function(ln, offset) {
- var s = ln.slice(offset);
if (!(this.tip._open)) {
throw { msg: "Attempted to add line (" + ln + ") to closed container." };
}
- this.tip._strings.push(s);
+ this.tip._strings.push(ln.slice(offset));
};
// Add block of type tag as a child of the tip. If the tip can't