DEV: Resolve topic#details computed-property.override deprecation (#20612)

This commit is contained in:
David Taylor 2023-03-09 13:44:50 +00:00 committed by GitHub
parent 059ac3d31a
commit b1727d9748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -183,12 +183,15 @@ const Topic = RestModel.extend({
return postsCount - 1; return postsCount - 1;
}, },
@discourseComputed get details() {
details() { return (this._details ??= this.store.createRecord("topicDetails", {
return this.store.createRecord("topicDetails", {
id: this.id, id: this.id,
topic: this, topic: this,
}); }));
},
set details(value) {
return (this._details = value);
}, },
@discourseComputed("visible") @discourseComputed("visible")