chaplinjs/chaplin — pull request #315 by Rendez (2012-12-14 14:43:48+00:00)
Title: Fix bug with "events" and "beforeAction" hashes in loops where getPrototypeChain() is used

```
var A, B,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

A = (function() {

A.name = 'A';

function A() {}

return A;

})();

B = (function(_super) {

__extends(B, _super);

B.name = 'B';

function B() {
return B.__super__.constructor.apply(this, arguments);
}

B.prototype.obj = {
foo: 'bar'
};

return B;

})(A);

instance = new A;

chain = require('chaplin/lib/utils').getPrototypeChain instance
for item in chain
for proto of item
# Access to proto.obj here will always work, despite `class A` not having one, therefore, duplication can arise in the loop for this case!
```