summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/lib/blocks.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
index c70af15..d4f6790 100644
--- a/js/lib/blocks.js
+++ b/js/lib/blocks.js
@@ -257,10 +257,7 @@ var incorporateLine = function(ln) {
// Bail out on failure: container will point to the last matching block.
// Set all_matched to false if not all containers match.
var lastChild;
- while ((lastChild = container._lastChild)) {
- if (!lastChild._open) {
- break;
- }
+ while ((lastChild = container._lastChild) && lastChild._open) {
container = lastChild;
match = matchAt(reNonSpace, ln, offset);