mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 02:53:38 +08:00
FIX: Allow deprecation to work with Ember CLI
This commit is contained in:
parent
8851b79472
commit
3062036f2f
|
@ -273,12 +273,17 @@ export function addNavItem(item) {
|
|||
NavItem.extraNavItemDescriptors.push(item);
|
||||
}
|
||||
|
||||
Object.defineProperty(Discourse, "NavItem", {
|
||||
get() {
|
||||
deprecated("Import the NavItem class instead of using Discourse.NavItem", {
|
||||
since: "2.4.0",
|
||||
dropFrom: "2.5.0"
|
||||
});
|
||||
return NavItem;
|
||||
}
|
||||
});
|
||||
if (typeof Discourse !== "undefined") {
|
||||
Object.defineProperty(Discourse, "NavItem", {
|
||||
get() {
|
||||
deprecated(
|
||||
"Import the NavItem class instead of using Discourse.NavItem",
|
||||
{
|
||||
since: "2.4.0",
|
||||
dropFrom: "2.5.0"
|
||||
}
|
||||
);
|
||||
return NavItem;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user