mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
🐛 fix title not updating after import (#749)
closes https://github.com/TryGhost/Ghost/issues/8508 - manually set `config.blogTitle` when reloading settings after a successful import
This commit is contained in:
parent
808fd492de
commit
698a446b0a
@ -22,11 +22,12 @@ export default Controller.extend({
|
||||
|
||||
importMimeType: ['application/json', 'application/zip', 'application/x-zip-compressed'],
|
||||
|
||||
ajax: injectService(),
|
||||
config: injectService(),
|
||||
ghostPaths: injectService(),
|
||||
notifications: injectService(),
|
||||
session: injectService(),
|
||||
settings: injectService(),
|
||||
ajax: injectService(),
|
||||
|
||||
// TODO: convert to ember-concurrency task
|
||||
_validate(file) {
|
||||
@ -133,7 +134,9 @@ export default Controller.extend({
|
||||
notifications.showNotification('Import successful.', {key: 'import.upload.success'});
|
||||
|
||||
// reload settings
|
||||
return this.get('settings').reload();
|
||||
return this.get('settings').reload().then((settings) => {
|
||||
this.get('config').set('blogTitle', settings.get('title'));
|
||||
});
|
||||
});
|
||||
}).catch((response) => {
|
||||
if (isUnsupportedMediaTypeError(response)) {
|
||||
|
Loading…
Reference in New Issue
Block a user