mirror of
https://github.com/robertkrimen/otto
synced 2025-10-12 20:27:30 +08:00
Mutable bindings should not be deletable by default
This commit is contained in:
parent
614b345e7a
commit
38b9c8071f
|
@ -185,7 +185,7 @@ func (self *_declarativeEnvironment) SetMutableBinding(name string, value Value,
|
|||
|
||||
func (self *_declarativeEnvironment) SetValue(name string, value Value, throw bool) {
|
||||
if !self.HasBinding(name) {
|
||||
self.CreateMutableBinding(name, true) // Deletable by default
|
||||
self.CreateMutableBinding(name, false) // NOT deletable by default
|
||||
}
|
||||
self.SetMutableBinding(name, value, throw)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user