Minor changes to bootstrap.js

This commit is contained in:
Jürg Lehni 2013-05-05 22:39:59 -07:00
parent fa34ea5e5b
commit dbc07207f7

6
lib/bootstrap.js vendored
View file

@ -36,7 +36,7 @@ var Base = new function() { // Bootstrap scope
// supports the first parameter (in the emulation):
create = Object.create || function(proto) {
// From all browsers that do not offer Object.create(), we only
// support Firefox 3.5 & 3.5, but luckily this hack works there:
// support Firefox 3.5 & 3.5, and this hack works there:
return { __proto__: proto };
},
_define = Object.defineProperty,
@ -55,8 +55,8 @@ var Base = new function() { // Bootstrap scope
} catch (e) {}
}
if ((desc.get || desc.set) && obj.__defineGetter__) {
desc.get && obj.__defineGetter__(name, desc.get);
desc.set && obj.__defineSetter__(name, desc.set);
if (desc.get) obj.__defineGetter__(name, desc.get);
if (desc.set) obj.__defineSetter__(name, desc.set);
} else {
obj[name] = desc.value;
}