Controller extension overwrites base classes
Closed this issue · 1 comments
orthecreedence commented
There was a bug in the Controller.extend method, causing a lot of element/event chaos:
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.
orthecreedence commented
Fixed in 0.6.0 release (current HEAD)