1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/wizard/components/wizard-category-selector.js.es6
Angus McLeod cf50a7deb3
Apply prettier 💄 (#80)
* Apply prettier

* applied prettier for similar-topics-validator

Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
2021-03-28 14:36:49 +05:30

17 Zeilen
515 B
JavaScript

import CategorySelector from "select-kit/components/category-selector";
import { computed } from "@ember/object";
import { makeArray } from "discourse-common/lib/helpers";
export default CategorySelector.extend({
content: computed(
"categories.[]",
"blacklist.[]",
"whitelist.[]",
function () {
return this._super().filter((category) => {
const whitelist = makeArray(this.whitelist);
return !whitelist.length || whitelist.indexOf(category.id) > -1;
});
}
),
});