REFACTOR: Remove `Discourse.SiteSettimgs` from @setting decorator

This commit is contained in:
Robin Ward 2020-07-22 12:55:23 -04:00
parent 4ecb4439b9
commit 939fae3500
2 changed files with 3 additions and 2 deletions

View File

@ -162,6 +162,6 @@ export function endWith() {
**/
export function setting(name) {
return computed(function() {
return Discourse.SiteSettings[name];
return this.siteSettings[name];
});
}

View File

@ -25,7 +25,8 @@ discourseModule("lib:computed", {
});
QUnit.test("setting", function(assert) {
var t = EmberObject.extend({
let t = EmberObject.extend({
siteSettings: this.siteSettings,
vehicle: setting("vehicle"),
missingProp: setting("madeUpThing")
}).create();