A pattern with no name or contentName does not insert undefined into scope array

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-09-07 11:20:56 -07:00
parent 10c36191ec
commit b00830cbc8
2 changed files with 12 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ class Pattern
handleMatch: (stack, line, captureIndices) ->
scopes = _.pluck(stack, "scopeName")
scopes.push(@scopeName) unless @popRule
scopes.push(@scopeName) if @scopeName and not @popRule
if @captures
tokens = @getTokensForCaptureIndices(line, captureIndices, scopes)