mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 13:38:49 +08:00
FIX: Make sure the context of plugin outlets is correct
This commit is contained in:
parent
e65283ecf5
commit
6ae7d48fd1
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user