FIX: Make sure the context of plugin outlets is correct

This commit is contained in:
Robin Ward 2014-06-05 15:20:55 -04:00
parent e65283ecf5
commit 6ae7d48fd1
1 changed files with 4 additions and 1 deletions

View File

@ -75,9 +75,12 @@ function buildConnectorCache() {
export default function(connectionName, options) {
if (!_connectorCache) { buildConnectorCache(); }
var self = this;
if (_connectorCache[connectionName]) {
var CustomContainerView = Ember.ContainerView.extend({
childViews: _connectorCache[connectionName].map(function(vc) { return vc.create(); })
childViews: _connectorCache[connectionName].map(function(vc) {
return vc.create({context: self});
})
});
return Ember.Handlebars.helpers.view.call(this, CustomContainerView, options);
}