DEV: Add safe deprecation to `Discourse.User`
This commit is contained in:
parent
46730a2f0d
commit
b4bd238dd6
|
@ -990,6 +990,7 @@ User.reopenClass(Singleton, {
|
|||
}
|
||||
});
|
||||
|
||||
if (typeof Discourse !== "undefined") {
|
||||
let warned = false;
|
||||
Object.defineProperty(Discourse, "User", {
|
||||
get() {
|
||||
|
@ -1003,5 +1004,6 @@ Object.defineProperty(Discourse, "User", {
|
|||
return User;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export default User;
|
||||
|
|
Loading…
Reference in New Issue