mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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);
|
NavItem.extraNavItemDescriptors.push(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperty(Discourse, "NavItem", {
|
if (typeof Discourse !== "undefined") {
|
||||||
get() {
|
Object.defineProperty(Discourse, "NavItem", {
|
||||||
deprecated("Import the NavItem class instead of using Discourse.NavItem", {
|
get() {
|
||||||
since: "2.4.0",
|
deprecated(
|
||||||
dropFrom: "2.5.0"
|
"Import the NavItem class instead of using Discourse.NavItem",
|
||||||
});
|
{
|
||||||
return NavItem;
|
since: "2.4.0",
|
||||||
}
|
dropFrom: "2.5.0"
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
return NavItem;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user