Skip to content

Commit

Permalink
Check state.pending length
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukaii authored and davidmehren committed Oct 3, 2022
1 parent ad61553 commit 00dee85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/mode/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 00dee85

Please sign in to comment.