1
0
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:
Robert Krimen 2013-02-23 14:24:19 -08:00
parent 614b345e7a
commit 38b9c8071f

View File

@ -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)
}