Skip to content

A platform for community discussion. Free, open, simple.

Allow FIELDS_IDS to be overridden

David Taylor37fe1c76b96f
diff --git a/app/assets/javascripts/admin/models/theme.js.es6 b/app/assets/javascripts/admin/models/theme.js.es6
index d2a82defec8..d7c5a89fd05 100644
--- a/app/assets/javascripts/admin/models/theme.js.es6
+++ b/app/assets/javascripts/admin/models/theme.js.es6
@@ -2,10 +2,11 @@ import RestModel from 'discourse/models/rest';
import { default as computed } from 'ember-addons/ember-computed-decorators';
const THEME_UPLOAD_VAR = 2;
-const FIELDS_IDS = [0, 1];
const Theme = RestModel.extend({
+ FIELDS_IDS: [0, 1],
+
@computed('theme_fields')
themeFields(fields) {
@@ -16,7 +17,7 @@ const Theme = RestModel.extend({
let hash = {};
fields.forEach(field => {
- if (!field.type_id || FIELDS_IDS.includes(field.type_id)) {
+ if (!field.type_id || this.get('FIELDS_IDS').includes(field.type_id)) {
hash[this.getKey(field)] = field;
}
});