mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:53:41 +08:00
FIX: Upgrade ember-cloaking to avoid setProperties
error
This commit is contained in:
parent
a7ad7f6a45
commit
b43ea8bcd1
12
vendor/assets/javascripts/ember-cloaking.js
vendored
12
vendor/assets/javascripts/ember-cloaking.js
vendored
|
@ -186,12 +186,12 @@
|
|||
|
||||
Em.run.schedule('afterRender', this, function() {
|
||||
onscreenCloaks.forEach(function (v) {
|
||||
if(v && v.uncloak) {
|
||||
if(v && v.uncloak && (v._state || v.state) === 'inDOM') {
|
||||
v.uncloak();
|
||||
}
|
||||
});
|
||||
toCloak.forEach(function (v) { v.cloak(); });
|
||||
if(self._nextUncloak){Em.run.cancel(self._nextUncloak)}
|
||||
if (self._nextUncloak) { Em.run.cancel(self._nextUncloak); }
|
||||
self._nextUncloak = Em.run.later(self, self.uncloakQueue,50);
|
||||
});
|
||||
|
||||
|
@ -369,15 +369,15 @@
|
|||
}
|
||||
},
|
||||
|
||||
willDestroyElement: function(){
|
||||
_removeContainedView: function(){
|
||||
if(this._containedView){
|
||||
this._containedView.remove();
|
||||
this._containedView = null;
|
||||
}
|
||||
this._super();
|
||||
},
|
||||
}.on('willDestroyElement'),
|
||||
|
||||
didInsertElement: function(){
|
||||
_setHeights: function(){
|
||||
if (!this._containedView) {
|
||||
// setting default height
|
||||
// but do not touch if height already defined
|
||||
|
@ -390,7 +390,7 @@
|
|||
this.$().css('height', defaultHeight);
|
||||
}
|
||||
}
|
||||
},
|
||||
}.on('didInsertElement'),
|
||||
|
||||
/**
|
||||
Render the cloaked view if applicable.
|
||||
|
|
Loading…
Reference in New Issue
Block a user