Update Bootstrap to not fail when overriding existing beans or getter / setters.

This commit is contained in:
Jürg Lehni 2011-02-16 00:18:08 +00:00
parent b0b9594f1e
commit 00ee00d6ac

View file

@ -16,7 +16,6 @@
* where deemeded necessary. * where deemeded necessary.
* See http://www.bootstrap-js.net/wiki/MootoolsDifferences * See http://www.bootstrap-js.net/wiki/MootoolsDifferences
*/ */
new function() { new function() {
var fix = !this.__proto__ && [Function, Number, Boolean, String, Array, Date, RegExp]; var fix = !this.__proto__ && [Function, Number, Boolean, String, Array, Date, RegExp];
if (fix) if (fix)
@ -53,13 +52,11 @@ new function() {
} }
function inject(dest, src, enumerable, base, preserve, generics) { function inject(dest, src, enumerable, base, preserve, generics) {
var beans; var beans, bean;
function field(name, val, dontCheck, generics) { function field(name, val, dontCheck, generics) {
if (!val) var val = val || (val = describe(src, name)) && (val.get ? val : val.value),
val = (val = describe(src, name)) && (val.get ? val : val.value); func = typeof val == 'function', res = val, prev = val && val.get ? null : dest[name];
var type = typeof val, func = type == 'function', res = val,
prev = dest[name], bean, part;
if (generics && func && (!preserve || !generics[name])) generics[name] = function(bind) { if (generics && func && (!preserve || !generics[name])) generics[name] = function(bind) {
return bind && dest[name].apply(bind, return bind && dest[name].apply(bind,
Array.prototype.slice.call(arguments, 1)); Array.prototype.slice.call(arguments, 1));