From 9e5703b6f76b6d26e6b8f46ae3eca239d01bd380 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 17 Jan 2015 13:06:25 -0800 Subject: Minor code simplification. --- js/lib/blocks.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'js') 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 -- cgit v1.2.3