DEV: Allow us to keep the deprecation with Ember CLI
This commit is contained in:
parent
4c17ff98fa
commit
46730a2f0d
|
@ -216,8 +216,9 @@ Site.reopenClass(Singleton, {
|
|||
}
|
||||
});
|
||||
|
||||
let warned = false;
|
||||
Object.defineProperty(Discourse, "Site", {
|
||||
if (typeof Discourse !== "undefined") {
|
||||
let warned = false;
|
||||
Object.defineProperty(Discourse, "Site", {
|
||||
get() {
|
||||
if (!warned) {
|
||||
deprecated("Import the Site class instead of using Discourse.Site", {
|
||||
|
@ -228,6 +229,7 @@ Object.defineProperty(Discourse, "Site", {
|
|||
}
|
||||
return Site;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export default Site;
|
||||
|
|
Loading…
Reference in New Issue