mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-09-21 01:27:10 +03:00
Fixed theme settings for non-active theme being destroyed/updated when syncing
no issue - the `.browse()` call to fetch themes was not structured to filter out themes correctly so it was fetching all theme settings rather than only settings related to the current theme
This commit is contained in:
parent
ef136a2029
commit
1a9087cfa8
@ -113,7 +113,7 @@ module.exports = class CustomThemeSettingsService {
|
||||
async syncRepositoryWithTheme(theme) {
|
||||
const themeSettings = theme.customSettings || {};
|
||||
|
||||
const settingsCollection = await this.repository.browse({theme: theme.themeName});
|
||||
const settingsCollection = await this.repository.browse({filter: `theme:${theme.name}`});
|
||||
let knownSettings = settingsCollection.toJSON();
|
||||
|
||||
// exit early if there's nothing to sync for this theme
|
||||
@ -164,7 +164,7 @@ module.exports = class CustomThemeSettingsService {
|
||||
}
|
||||
}
|
||||
|
||||
const updatedSettingsCollection = await this.repository.browse({theme: theme.themeName});
|
||||
const updatedSettingsCollection = await this.repository.browse({filter: `theme:${theme.name}`});
|
||||
return updatedSettingsCollection.toJSON();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user