Skip to content

Commit c1bd0df

Browse files
committed
corrected handling of global binds
1 parent f770382 commit c1bd0df

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

scope/scope.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ func (s *Scope) addBinding(t *javascript.Token, bindingType BindingType) {
121121
if !s.IsLexicalScope || len(bs) == 0 || bs[0].BindingType != BindingVar {
122122
return
123123
}
124-
}
125-
126-
if s.Parent == nil {
124+
} else if s.Parent == nil {
127125
s.Bindings[name] = []Binding{binding}
128126

129127
return

0 commit comments

Comments
 (0)