Adjust backbone test html, and adjust underscore html to work with Lo-Dash's tweaked chain behavior.

Former-commit-id: e5042e1c2811004989e57cc1a24f690c3bab1b25
This commit is contained in:
John-David Dalton
2013-07-28 10:10:28 -07:00
parent 1626cec089
commit 10de191dd5
2 changed files with 3 additions and 28 deletions

View File

@@ -30,8 +30,8 @@
</script>
<script>
_.mixin({
'debounce': lodash.debounce,
'defer': lodash.defer
'debounce': _.debounce || lodash.debounce,
'defer': _.defer || lodash.defer
});
</script>
<script src="../vendor/backbone/backbone.js"></script>

View File

@@ -31,7 +31,7 @@
push = arrayProto.push,
slice = arrayProto.slice;
if (lodash.chain && lodash.chain().__chain__) {
if (lodash().each().__chain__) {
return;
}
lodash.mixin = function(object) {
@@ -53,31 +53,6 @@
lodash.mixin(lodash);
lodash.chain = function(value) {
value = new lodash(value);
value.__chain__ = true;
return value;
};
lodash.prototype.chain = function() {
this.__chain__ = true;
return this;
};
lodash.prototype.concat = function() {
var result = concat.apply(this.__wrapped__, arguments);
if (this.__chain__) {
result = new lodash(result);
result.__chain__ = true;
}
return result;
};
lodash.prototype.pop = function() {
pop.apply(this.__wrapped__, arguments);
return this;
};
// expose lodash
window._ = lodash;
}