DEV: prevents deprecation of overriding computed property (#8030)

https://deprecations.emberjs.com/v3.x/#toc_computed-property-override
This commit is contained in:
Joffrey JAFFEUX 2019-08-22 12:31:18 +02:00 committed by GitHub
parent 78eb05e4ea
commit 74931eedfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions

View File

@ -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
});