mirror of
https://github.com/discourse/discourse.git
synced 2025-04-08 13:42:55 +08:00
DEV: Allow us to keep the deprecation with Ember CLI
This commit is contained in:
parent
4c17ff98fa
commit
46730a2f0d
@ -216,18 +216,20 @@ Site.reopenClass(Singleton, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let warned = false;
|
if (typeof Discourse !== "undefined") {
|
||||||
Object.defineProperty(Discourse, "Site", {
|
let warned = false;
|
||||||
get() {
|
Object.defineProperty(Discourse, "Site", {
|
||||||
if (!warned) {
|
get() {
|
||||||
deprecated("Import the Site class instead of using Discourse.Site", {
|
if (!warned) {
|
||||||
since: "2.4.0",
|
deprecated("Import the Site class instead of using Discourse.Site", {
|
||||||
dropFrom: "2.6.0"
|
since: "2.4.0",
|
||||||
});
|
dropFrom: "2.6.0"
|
||||||
warned = true;
|
});
|
||||||
|
warned = true;
|
||||||
|
}
|
||||||
|
return Site;
|
||||||
}
|
}
|
||||||
return Site;
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
export default Site;
|
export default Site;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user