FIX: Switch Property to Computed

This commit is contained in:
Diego Barreiro 2019-04-12 14:10:55 +02:00 committed by Neil Lalonde
parent 23ece34f53
commit 147b1350ea
1 changed files with 5 additions and 2 deletions

View File

@ -14,17 +14,20 @@ export default Ember.Component.extend({
this._super();
},
@computed("serve_id", "placement")
url: function() {
return (`//cdn.carbonads.com/carbon.js?serve=${this.get("serve_id")}&placement=${this.get("placement")}`).htmlSafe();
}.property("serve_id", "placement"),
},
@computed("trust_level")
checkTrustLevels: function() {
return !(
currentUser &&
currentUser.get("trust_level") >
Discourse.SiteSettings.carbonads_through_trust_level
);
}.property("trust_level"),
},
@computed("checkTrustLevels")
showAd: function(checkTrustLevels) {