mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FIX: on create you could not add a theme component
This commit is contained in:
@ -73,6 +73,10 @@ const Theme = RestModel.extend({
|
||||
|
||||
addChildTheme(theme){
|
||||
let childThemes = this.get("childThemes");
|
||||
if (!childThemes) {
|
||||
childThemes = [];
|
||||
this.set('childThemes', childThemes);
|
||||
}
|
||||
childThemes.removeObject(theme);
|
||||
childThemes.pushObject(theme);
|
||||
return this.saveChanges("child_theme_ids");
|
||||
|
Reference in New Issue
Block a user