1
0
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:
Robert Krimen
2012-12-26 17:25:00 -08:00
parent dc83a19a06
commit 8f2a1c60e5

View File

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