mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: Make sure the context of plugin outlets is correct
This commit is contained in:
parent
e65283ecf5
commit
6ae7d48fd1
1 changed files with 4 additions and 1 deletions
|
@ -75,9 +75,12 @@ function buildConnectorCache() {
|
||||||
export default function(connectionName, options) {
|
export default function(connectionName, options) {
|
||||||
if (!_connectorCache) { buildConnectorCache(); }
|
if (!_connectorCache) { buildConnectorCache(); }
|
||||||
|
|
||||||
|
var self = this;
|
||||||
if (_connectorCache[connectionName]) {
|
if (_connectorCache[connectionName]) {
|
||||||
var CustomContainerView = Ember.ContainerView.extend({
|
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);
|
return Ember.Handlebars.helpers.view.call(this, CustomContainerView, options);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue