mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: Errors due to _elementCreated
called on null
This commit is contained in:
parent
dd7b3d313e
commit
a1498925ef
1 changed files with 10 additions and 10 deletions
20
vendor/assets/javascripts/ember-cloaking.js
vendored
20
vendor/assets/javascripts/ember-cloaking.js
vendored
|
@ -306,23 +306,23 @@
|
|||
setContainedView: function(cv) {
|
||||
if (this._childViews[0]) {
|
||||
this._childViews[0].destroy();
|
||||
this._childViews[0] = cv;
|
||||
}
|
||||
this._childViews[0] = cv;
|
||||
this.setupChildView(cv);
|
||||
if (!this._elementCreated || this._scheduled) return;
|
||||
|
||||
if (cv) {
|
||||
cv.set('_parentView', this);
|
||||
cv.set('templateData', this.get('templateData'));
|
||||
this._childViews[0] = cv;
|
||||
} else {
|
||||
this._childViews.clear();
|
||||
}
|
||||
|
||||
if (!this._elementCreated || this._scheduled) return;
|
||||
this._scheduled = true;
|
||||
this.set('_containedView', cv);
|
||||
Ember.run.schedule('render', this, this.updateChildView);
|
||||
},
|
||||
|
||||
setupChildView: function (childView) {
|
||||
if (childView) {
|
||||
childView.set('_parentView', this);
|
||||
childView.set('templateData', this.get('templateData'));
|
||||
}
|
||||
},
|
||||
|
||||
render: function (buffer) {
|
||||
var el = buffer.element();
|
||||
this._childViewsMorph = buffer.dom.createMorph(el, null, null, el);
|
||||
|
|
Loading…
Reference in a new issue