DEV: prevents deprecation of overriding computed property (#8030)
https://deprecations.emberjs.com/v3.x/#toc_computed-property-override
This commit is contained in:
parent
78eb05e4ea
commit
74931eedfd
|
@ -101,8 +101,19 @@ const NavItem = Discourse.Model.extend({
|
|||
});
|
||||
|
||||
const ExtraNavItem = NavItem.extend({
|
||||
@computed("href")
|
||||
href: href => href,
|
||||
href: computed("href", {
|
||||
get() {
|
||||
if (this._href) {
|
||||
return this._href;
|
||||
}
|
||||
|
||||
return this.href;
|
||||
},
|
||||
|
||||
set(key, value) {
|
||||
return (this._href = value);
|
||||
}
|
||||
}),
|
||||
|
||||
customFilter: null
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue