mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 20:36:39 +08:00
REFACTOR: Remove Discourse.SiteSettimgs
from @setting decorator
This commit is contained in:
parent
4ecb4439b9
commit
939fae3500
|
@ -162,6 +162,6 @@ export function endWith() {
|
||||||
**/
|
**/
|
||||||
export function setting(name) {
|
export function setting(name) {
|
||||||
return computed(function() {
|
return computed(function() {
|
||||||
return Discourse.SiteSettings[name];
|
return this.siteSettings[name];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,8 @@ discourseModule("lib:computed", {
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("setting", function(assert) {
|
QUnit.test("setting", function(assert) {
|
||||||
var t = EmberObject.extend({
|
let t = EmberObject.extend({
|
||||||
|
siteSettings: this.siteSettings,
|
||||||
vehicle: setting("vehicle"),
|
vehicle: setting("vehicle"),
|
||||||
missingProp: setting("madeUpThing")
|
missingProp: setting("madeUpThing")
|
||||||
}).create();
|
}).create();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user