lyonbros/composer.js — Issue #4: Controller extension overwrites base classes
Author: orthecreedence
Created: 2012-01-30 02:18:31+00:00
State: open

There was a bug in the Controller.extend method, causing a lot of element/event chaos:

```javascript
var Animal = Composer.Controller.extend({ elements: {"#body": "body"} });
var Bear = Composer.Controller.extend({ elements: {"#snout": "snout"} });
var Pelican = Composer.Controller.extend({ elements: {"#beak": "beak"} });

console.log(new Animal().elements);
{ "#body" : "body", "#snout" : "snout", "#beak" : "beak"}
```

This was caused by my assumption that Mootools' Object.merge is functional, but it actually is destructive to the first argument in the function.