Only check for getters, not setters when deciding wether an object is a simple value or an accesor description. Workaround for a bug where Point is interpreted as accessor due to its #set(x, y) method.

This commit is contained in:
Jürg Lehni 2011-11-11 14:45:16 +01:00
parent 99a8532cca
commit e813ffd102

2
lib/bootstrap.js vendored
View file

@ -168,7 +168,7 @@ var Base = new function() { // Bootstrap scope
beans.push([ bean[3].toLowerCase() + bean[4], bean[2] ]);
}
// No need to look up getter if this is a function already.
if (!res || func || !res.get && !res.set)
if (!res || func || !res.get)
res = { value: res, writable: true };
// Only set/change configurable and enumerable if this field is
// configurable