I've been going through the Ember documentation and am seeing an inconsistency in where the _super
method is being called when overriding init
.
This is the most common and is what I've been using so far
var Foo = Em.Object.extend({
init: function(){
this._super();
// ... my stuff ...
}
});
last night I was reading through this write up and saw an example doing this
var Bar = Em.Object.extend({
init: function(){
// ... my stuff ...
return this._super();
}
});
It was actually an Ember.ContainerView
in the code snippet.
Can anyone explain this? My code OCD is acting up and I can't move on until I know.