mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Default a descriptor value to undefined if writable is given
This commit is contained in:
@@ -80,6 +80,7 @@ func toPropertyDescriptor(value Value) (descriptor _property) {
|
||||
}
|
||||
|
||||
if objectDescriptor.hasProperty("writable") {
|
||||
descriptor.value = UndefinedValue() // FIXME Is this the right place for this?
|
||||
if objectDescriptor.get("writable").toBoolean() {
|
||||
mode |= 0100
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user