diff --git a/addon/mode/simple.js b/addon/mode/simple.js index 1f0e0beb76c..9c47a61c14b 100644 --- a/addon/mode/simple.js +++ b/addon/mode/simple.js @@ -95,7 +95,7 @@ function tokenFunction(states, config) { return function(stream, state) { - if (state.pending) { + if (state.pending && state.pending.length > 0) { var pend = state.pending.shift(); if (state.pending.length == 0) state.pending = null; stream.pos += pend.text.length;