FIX: Restore (deprecated) ability to overwrite a property (#11207)

It should be a `readOnly` but some themes/plugins still pass the `categories` property into this component, so…
This commit is contained in:
Jarek Radosz 2020-11-11 22:16:20 +01:00 committed by GitHub
parent 803b8933fa
commit cd6dbd3e9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,14 +4,18 @@ import { inject as service } from "@ember/service";
import Component from "@ember/component";
import FilterModeMixin from "discourse/mixins/filter-mode";
import bootbox from "bootbox";
import { readOnly } from "@ember/object/computed";
export default Component.extend(FilterModeMixin, {
router: service(),
tagName: "",
categories: readOnly("site.categoriesList"),
// Should be a `readOnly` instead but some themes/plugins still pass
// the `categories` property into this component
@discourseComputed("site.categoriesList")
categories(categoriesList) {
return categoriesList;
},
@discourseComputed("category")
showCategoryNotifications(category) {