Permalink
Browse files

Fixed so different versions of extender can work together in harmony

  • Loading branch information...
1 parent 7510598 commit 3911221752505bde15d4d099270708f3632a59fe @doug-martin committed Jan 15, 2013
Showing with 6 additions and 6 deletions.
  1. +2 −2 extender-min.js
  2. +4 −4 extender.js
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -370,11 +370,11 @@
},
eq: function eq(val) {
- return _extender(this._value === val);
+ return this["__extender__"](this._value === val);
},
neq: function neq(other) {
- return _extender(this._value !== other);
+ return this["__extender__"](this._value !== other);
},
print: function () {
console.log(this._value);
@@ -398,7 +398,7 @@
var args = slice.call(arguments);
args.unshift(this._value);
var ret = func.apply(this, args);
- return ret !== undef ? _extender(ret) : this;
+ return ret !== undef ? this["__extender__"](ret) : this;
};
}
proto[name] = extendedMethod;
@@ -445,7 +445,7 @@
function _extender(obj) {
var ret = obj, i, l;
if (!(obj instanceof Base)) {
- var base = {}, instance = (base.instance = {});
+ var base = {}, instance = (base.instance = {"__extender__": _extender});
for (i = 0, l = defined.length; i < l; i++) {
var definer = defined[i];
if (definer[0](obj)) {

0 comments on commit 3911221

Please sign in to comment.