Update straps.js

This commit is contained in:
Jürg Lehni 2013-06-12 18:54:34 -07:00
parent 294bfc9c9a
commit a163d890e6

View file

@ -101,7 +101,7 @@ var Base = new function() {
* (and inherinting from) base. * (and inherinting from) base.
*/ */
function inject(dest, src, enumerable, base, preserve, generics) { function inject(dest, src, enumerable, base, preserve, generics) {
var beans, bean; var beans;
/** /**
* Private function that injects one field with given name and checks if * Private function that injects one field with given name and checks if
@ -126,7 +126,8 @@ var Base = new function() {
// defining a getter, don't lookup previous value, but look if // defining a getter, don't lookup previous value, but look if
// the property exists (name in dest) and store result in prev // the property exists (name in dest) and store result in prev
prev = preserve || isFunc prev = preserve || isFunc
? (val && val.get ? name in dest : dest[name]) : null; ? (val && val.get ? name in dest : dest[name]) : null,
bean;
if ((dontCheck || val !== undefined && src.hasOwnProperty(name)) if ((dontCheck || val !== undefined && src.hasOwnProperty(name))
&& (!preserve || !prev)) { && (!preserve || !prev)) {
// Expose the 'super' function (meaning the one this function is // Expose the 'super' function (meaning the one this function is
@ -183,7 +184,8 @@ var Base = new function() {
// support of this.base() (See above). // support of this.base() (See above).
for (var i = 0, l = beans && beans.length; i < l; i++) for (var i = 0, l = beans && beans.length; i < l; i++)
try { try {
var bean = beans[i], part = bean[1]; var bean = beans[i],
part = bean[1];
field(bean[0], { field(bean[0], {
get: dest['get' + part] || dest['is' + part], get: dest['get' + part] || dest['is' + part],
set: dest['set' + part] set: dest['set' + part]